projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
21718: Replace .decode method with str(bytes, "utf-8")
[arvados.git]
/
sdk
/
cwl
/
arvados_cwl
/
pathmapper.py
diff --git
a/sdk/cwl/arvados_cwl/pathmapper.py
b/sdk/cwl/arvados_cwl/pathmapper.py
index 448facf776823c68f5c706cc0ec1707460222cf7..ac6df543ad054dcc35f282a8a8510872da4bf36c 100644
(file)
--- a/
sdk/cwl/arvados_cwl/pathmapper.py
+++ b/
sdk/cwl/arvados_cwl/pathmapper.py
@@
-2,12
+2,6
@@
#
# SPDX-License-Identifier: Apache-2.0
#
# SPDX-License-Identifier: Apache-2.0
-from future import standard_library
-standard_library.install_aliases()
-from builtins import str
-from past.builtins import basestring
-from future.utils import viewitems
-
import re
import logging
import uuid
import re
import logging
import uuid
@@
-72,7
+66,7
@@
class ArvPathMapper(PathMapper):
debug = logger.isEnabledFor(logging.DEBUG)
debug = logger.isEnabledFor(logging.DEBUG)
- if isinstance(src,
basestring
) and src.startswith("keep:"):
+ if isinstance(src,
str
) and src.startswith("keep:"):
if collection_pdh_pattern.match(src):
self._pathmap[src] = MapperEnt(src, self.collection_pattern % urllib.parse.unquote(src[5:]), srcobj["class"], True)
if collection_pdh_pattern.match(src):
self._pathmap[src] = MapperEnt(src, self.collection_pattern % urllib.parse.unquote(src[5:]), srcobj["class"], True)
@@
-346,7
+340,7
@@
class StagingPathMapper(PathMapper):
# Overridden to maintain the use case of mapping by source (identifier) to
# target regardless of how the map is structured interally.
def getMapperEnt(src):
# Overridden to maintain the use case of mapping by source (identifier) to
# target regardless of how the map is structured interally.
def getMapperEnt(src):
- for k,v in
viewitems(self._pathmap
):
+ for k,v in
self._pathmap.items(
):
if (v.type != "CreateFile" and v.resolved == src) or (v.type == "CreateFile" and k == src):
return v
if (v.type != "CreateFile" and v.resolved == src) or (v.type == "CreateFile" and k == src):
return v
@@
-365,7
+359,7
@@
class VwdPathMapper(StagingPathMapper):
# with any secondary files.
self.visitlisting(referenced_files, self.stagedir, basedir)
# with any secondary files.
self.visitlisting(referenced_files, self.stagedir, basedir)
- for path, (ab, tgt, type, staged) in
viewitems(self._pathmap
):
+ for path, (ab, tgt, type, staged) in
self._pathmap.items(
):
if type in ("File", "Directory") and ab.startswith("keep:"):
self._pathmap[path] = MapperEnt("$(task.keep)/%s" % ab[5:], tgt, type, staged)
if type in ("File", "Directory") and ab.startswith("keep:"):
self._pathmap[path] = MapperEnt("$(task.keep)/%s" % ab[5:], tgt, type, staged)