Commit 7b9de3b2 authored by Daalen, Tim van's avatar Daalen, Tim van
Browse files

irods rules not always return an error

parent a2c5b92f
......@@ -733,14 +733,19 @@ class irodsConnector():
stderr = []
if len(out.MsParam_PI) > 0:
try:
stdout = [o.decode()
for o in (out.MsParam_PI[0].inOutStruct.stdoutBuf.buf.strip(b'\x00')).split(b'\n')]
stderr = [o.decode()
for o in (out.MsParam_PI[0].inOutStruct.stderrBuf.buf.strip(b'\x00')).split(b'\n')]
if out.MsParam_PI[0].inOutStruct.stdoutBuf.buf != None:
stdout = [o.decode()
for o in (out.MsParam_PI[0].inOutStruct.stdoutBuf.buf.strip(b'\x00')).split(b'\n')]
else:
stdout = ""
if out.MsParam_PI[0].inOutStruct.stderrBuf.buf != None:
stderr = [o.decode()
for o in (out.MsParam_PI[0].inOutStruct.stderrBuf.buf.strip(b'\x00')).split(b'\n')]
else:
stdout = ""
except AttributeError:
logging.info('RULE EXECUTION ERROR: '+str(stdout+stderr), exc_info=True)
return stdout, stderr
return "", ""
return stdout, stderr
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment