Skip to content

Commit c43b51c

Browse files
committed
Updated as per review by @gunter
1 parent e199ba6 commit c43b51c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tools/imagesets/imgset.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def run_with_logging(dockercall, cmd, logger, printlog=True):
3636
printlog : boolean, optional
3737
Print log to console
3838
"""
39-
import datetime;
4039
logger.propagate = printlog
4140
# remove extra whitespace
4241
normalize = lambda s: subprocess.list2cmdline(shlex.split(s))
@@ -59,12 +58,10 @@ def run_with_logging(dockercall, cmd, logger, printlog=True):
5958
decoded = decoded[:-1]
6059
logger.info(decoded)
6160
ret = pipe.poll()
62-
if ret == None:
61+
if ret is None:
6362
ret = pipe.wait(timeout=timeout)
6463
# ret will be None if exception TimeoutExpired was raised and caught.
65-
if ret != 0:
66-
raise subprocess.CalledProcessError(ret, cmdstr)
67-
elif ret != 0:
64+
if ret != 0:
6865
raise subprocess.CalledProcessError(ret, cmdstr)
6966

7067
# A set of docker images suitable for building and running isce3
@@ -687,4 +684,4 @@ def tartests(self):
687684
for workflow in workflowtests:
688685
for test in workflowtests[workflow]:
689686
print(f"\ntarring workflow test {test}\n")
690-
subprocess.check_call(f"tar cvzf {test}.tar.gz {test}".split(), cwd=self.testdir)
687+
subprocess.check_call(f"tar cvz --exclude scratch*/* -f {test}.tar.gz {test}".split(), cwd=self.testdir)

0 commit comments

Comments
 (0)