- # Local FS ref, may need to be uploaded or may be on keep
- # mount.
- ab = abspath(src, self.input_basedir)
- st = arvados.commands.run.statfile("", ab,
- fnPattern="keep:%s/%s",
- dirPattern="keep:%s/%s")
- with SourceLine(srcobj, "location", WorkflowException):
- if isinstance(st, arvados.commands.run.UploadFile):
- uploadfiles.add((src, ab, st))
- elif isinstance(st, arvados.commands.run.ArvFile):
- self._pathmap[src] = MapperEnt(st.fn, self.collection_pattern % st.fn[5:], "File", True)
- elif src.startswith("_:"):
- if "contents" in srcobj:
- pass
+ if src.startswith("file:"):
+ # Local FS ref, may need to be uploaded or may be on keep
+ # mount.
+ ab = abspath(src, self.input_basedir)
+ st = arvados.commands.run.statfile("", ab,
+ fnPattern="keep:%s/%s",
+ dirPattern="keep:%s/%s",
+ raiseOSError=True)
+ with SourceLine(srcobj, "location", WorkflowException, debug):
+ if isinstance(st, arvados.commands.run.UploadFile):
+ uploadfiles.add((src, ab, st))
+ elif isinstance(st, arvados.commands.run.ArvFile):
+ self._pathmap[src] = MapperEnt(st.fn, self.collection_pattern % urllib.unquote(st.fn[5:]), "File", True)