From 4eae79f6abe62395f26a263b83e9cbf0072345bb Mon Sep 17 00:00:00 2001 From: Stanislaw Adaszewski Date: Mon, 27 Apr 2020 16:41:37 +0200 Subject: [PATCH] Improved CopyStep --- steps.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/steps.py b/steps.py index 9b1a742..dae7ca2 100644 --- a/steps.py +++ b/steps.py @@ -60,10 +60,8 @@ class CopyStep(object): lst = [ self.spec ] \ if not isinstance(self.spec[0], list) \ else self.spec - for a in lst: - source, target = a - if target.startswith('/'): - target = target[1:] + for (source, target) in lst: + target = target.strip('/') shutil.copyfile(os.path.join(kwargs['args'].focker_dir, source), os.path.join(path, target))