Skip to content

Commit 8a93d33

Browse files
committed
remove adjustFilesWithSecondary() & empty_subtree()
no longer used
1 parent 01dd696 commit 8a93d33

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

cwltool/process.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -208,24 +208,6 @@ def checkRequirements(rec, supported_process_requirements):
208208
checkRequirements(entry, supported_process_requirements)
209209

210210

211-
def adjustFilesWithSecondary(rec, op, primary=None):
212-
"""Apply a mapping function to each File path in the object `rec`, propagating
213-
the primary file associated with a group of secondary files.
214-
"""
215-
216-
if isinstance(rec, MutableMapping):
217-
if rec.get("class") == "File":
218-
rec["path"] = op(rec["path"], primary=primary)
219-
adjustFilesWithSecondary(rec.get("secondaryFiles", []), op,
220-
primary if primary else rec["path"])
221-
else:
222-
for d in rec:
223-
adjustFilesWithSecondary(rec[d], op)
224-
if isinstance(rec, MutableSequence):
225-
for d in rec:
226-
adjustFilesWithSecondary(d, op, primary)
227-
228-
229211
def stage_files(pathmapper, # type: PathMapper
230212
stage_func=None, # type: Callable[..., Any]
231213
ignore_writable=False, # type: bool
@@ -803,25 +785,6 @@ def job(self,
803785
pass
804786

805787

806-
def empty_subtree(dirpath): # type: (Text) -> bool
807-
# Test if a directory tree contains any files (does not count empty
808-
# subdirectories)
809-
for d in os.listdir(dirpath):
810-
d = os.path.join(dirpath, d)
811-
try:
812-
if stat.S_ISDIR(os.stat(d).st_mode):
813-
if empty_subtree(d) is False:
814-
return False
815-
else:
816-
return False
817-
except OSError as e:
818-
if e.errno == errno.ENOENT:
819-
pass
820-
else:
821-
raise
822-
return True
823-
824-
825788
_names = set() # type: Set[Text]
826789

827790

0 commit comments

Comments
 (0)