Skip to content

Commit 1a0e556

Browse files
author
Peter Amstutz
committed
If the return value from main() is a basestring, write it directly instead of
json encoding it.
1 parent a85f8fd commit 1a0e556

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cwltool/main.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,11 @@ def main(argsl=None,
613613
)
614614
# This is the workflow output, it needs to be written
615615
if out is not None:
616-
stdout.write(json.dumps(out, indent=4))
616+
if isinstance(out, basestring):
617+
stdout.write(out)
618+
else:
619+
stdout.write(json.dumps(out, indent=4))
620+
stdout.write("\n")
617621
stdout.flush()
618622
else:
619623
return 1

0 commit comments

Comments
 (0)