Actions
Bug #12418
closed[CWL] Crash with glob on empty collection
Story points:
-
Description
2017-10-08_14:17:52 e51c5-8i9sb-xo9w8fidi304bcv 6764 0 stderr Unexpected error from fs_access 2017-10-08_14:17:52 e51c5-8i9sb-xo9w8fidi304bcv 6764 0 stderr Traceback (most recent call last): 2017-10-08_14:17:52 e51c5-8i9sb-xo9w8fidi304bcv 6764 0 stderr File "/usr/lib/python2.7/dist-packages/cwltool/draft2tool.py", line 578, in collect_output 2017-10-08_14:17:52 e51c5-8i9sb-xo9w8fidi304bcv 6764 0 stderr prefix = fs_access.glob(outdir) 2017-10-08_14:17:52 e51c5-8i9sb-xo9w8fidi304bcv 6764 0 stderr File "/usr/lib/python2.7/dist-packages/arvados_cwl/fsaccess.py", line 86, in glob 2017-10-08_14:17:52 e51c5-8i9sb-xo9w8fidi304bcv 6764 0 stderr patternsegments = rest.split("/") 2017-10-08_14:17:52 e51c5-8i9sb-xo9w8fidi304bcv 6764 0 stderr AttributeError: 'NoneType' object has no attribute 'split'
The branch right before this:
if collection and not rest: return [pattern] patternsegments = rest.split("/")
We know rest is None
Seems that bool(collection) is False, this means collection must be None (?) Testing indicates that bool(collection) == True even when collection is empty.
Actions