Skip to content

Commit a2ea4e8

Browse files
author
Peter Amstutz
committed
Bugfix: content of CreateFileRequirement may be unicode.
1 parent bd8c71f commit a2ea4e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cwltool/job.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,11 @@ def run(self, dry_run=False, pull_image=True, rm_container=True,
170170
if os.path.dirname(self.pathmapper.reversemap(src)[1]) != self.outdir:
171171
_logger.debug(u"symlinking %s to %s", dst, src)
172172
os.symlink(src, dst)
173-
elif isinstance(entry, str):
173+
elif isinstance(entry, (str, unicode)):
174174
with open(os.path.join(self.outdir, t), "w") as fout:
175175
fout.write(entry)
176176
else:
177-
raise Exception("Unhandled type")
177+
raise Exception("Unhandled type %s", type(entry))
178178

179179
if self.stdin:
180180
stdin = open(self.pathmapper.mapper(self.stdin)[0], "rb")

0 commit comments

Comments
 (0)