|
9 | 9 | import uuid |
10 | 10 | import base64 |
11 | 11 | import traceback |
12 | | -import requests |
13 | 12 |
|
14 | 13 | from pyinfrabox.infrabox import validate_json |
15 | 14 | from pyinfrabox.docker_compose import create_from |
@@ -132,15 +131,15 @@ def flush(self): |
132 | 131 |
|
133 | 132 | def compress(self, source, output): |
134 | 133 | try: |
135 | | - subprocess.check_call("tar cf %s ." % output, cwd=source) |
| 134 | + cmd = ["tar", "cf", output, "."] |
| 135 | + subprocess.check_call(cmd, cwd=source) |
136 | 136 | except subprocess.CalledProcessError as e: |
137 | 137 | self.console.collect(e.output) |
138 | 138 | raise |
139 | 139 |
|
140 | | - def uncompress(self, source, output, c): |
| 140 | + def uncompress(self, source, output): |
141 | 141 | try: |
142 | | - cmd = "tar xf %s" % source |
143 | | - c.collect(cmd, show=True) |
| 142 | + cmd = ["tar", "xf", source] |
144 | 143 | subprocess.check_call(cmd, cwd=output) |
145 | 144 | except subprocess.CalledProcessError as e: |
146 | 145 | self.console.collect(e.output) |
@@ -487,7 +486,7 @@ def main_run_job(self): |
487 | 486 | c.collect("output found for %s\n" % dep['name'], show=True) |
488 | 487 | infrabox_input_dir = os.path.join(self.infrabox_inputs_dir, dep['name'].split('/')[-1]) |
489 | 488 | os.makedirs(infrabox_input_dir) |
490 | | - self.uncompress(storage_input_file_tar, infrabox_input_dir, c) |
| 489 | + self.uncompress(storage_input_file_tar, infrabox_input_dir) |
491 | 490 | c.execute(['ls', '-alh', infrabox_input_dir], show=True) |
492 | 491 | os.remove(storage_input_file_tar) |
493 | 492 | else: |
|
0 commit comments