Skip to content

Commit 4adfcb7

Browse files
committed
renaming boolean value symFunc to symLink for better readability
1 parent b1854ac commit 4adfcb7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cwltool/job.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,9 @@ def run(self, pull_image=True, rm_container=True,
289289
if "PATH" not in env:
290290
env["PATH"] = str(os.environ["PATH"]) if onWindows() else os.environ["PATH"]
291291

292-
stageFiles(self.pathmapper, ignoreWritable=True, symFunc=True)
292+
stageFiles(self.pathmapper, ignoreWritable=True, symLink=True)
293293
if self.generatemapper:
294-
stageFiles(self.generatemapper, ignoreWritable=self.inplace_update, symFunc=True)
294+
stageFiles(self.generatemapper, ignoreWritable=self.inplace_update, symLink=True)
295295
relink_initialworkdir(self.generatemapper, inplace_update=self.inplace_update)
296296

297297
self._execute([], env, rm_tmpdir=rm_tmpdir, move_outputs=move_outputs)

cwltool/process.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,15 @@ def adjustFilesWithSecondary(rec, op, primary=None):
205205
adjustFilesWithSecondary(d, op, primary)
206206

207207

208-
def stageFiles(pm, stageFunc=None, ignoreWritable=False, symFunc=True):
208+
def stageFiles(pm, stageFunc=None, ignoreWritable=False, symLink=True):
209209
# type: (PathMapper, Callable[..., Any], bool, bool) -> None
210210
for f, p in pm.items():
211211
if not p.staged:
212212
continue
213213
if not os.path.exists(os.path.dirname(p.target)):
214214
os.makedirs(os.path.dirname(p.target), 0o0755)
215215
if p.type in ("File", "Directory") and (os.path.exists(p.resolved)):
216-
if symFunc: # Use symlink func if allowed
216+
if symLink: # Use symlink func if allowed
217217
if onWindows():
218218
if p.type == "File":
219219
shutil.copy(p.resolved, p.target)
@@ -282,7 +282,7 @@ def moveIt(src, dst):
282282
outfiles = [] # type: List[Dict[Text, Any]]
283283
collectFilesAndDirs(outputObj, outfiles)
284284
pm = PathMapper(outfiles, "", outdir, separateDirs=False)
285-
stageFiles(pm, stageFunc=moveIt,symFunc=False)
285+
stageFiles(pm, stageFunc=moveIt,symLink=False)
286286

287287
def _check_adjust(f):
288288
f["location"] = file_uri(pm.mapper(f["location"])[1])

0 commit comments

Comments
 (0)