aboutsummaryrefslogtreecommitdiff
path: root/src/allocator.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-02-26 16:16:42 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-02-26 16:16:42 +0100
commit0d06677043e485aa1366993e395c6fa85b600990 (patch)
treea4f5481e5e060723072add544ab1204c32530b7e /src/allocator.py
parente85f4882fe1e2a42b0fdac9f45588d4f424ebea7 (diff)
downloadallocbench-0d06677043e485aa1366993e395c6fa85b600990.tar.gz
allocbench-0d06677043e485aa1366993e395c6fa85b600990.zip
remove useles check if self.build_cmds are true
Diffstat (limited to 'src/allocator.py')
-rw-r--r--src/allocator.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/allocator.py b/src/allocator.py
index fe31ed4..00d62ac 100644
--- a/src/allocator.py
+++ b/src/allocator.py
@@ -146,17 +146,16 @@ class Allocator:
self.prepare()
print_status("Building", self.name, "...")
- if self.build_cmds:
- for cmd in self.build_cmds:
- cmd = cmd.format(dir=self.dir, srcdir=self.srcdir)
+ for cmd in self.build_cmds:
+ cmd = cmd.format(dir=self.dir, srcdir=self.srcdir)
- try:
- run_cmd(cmd, cwd=BUILDDIR, shell=True)
- except CalledProcessError as e:
- print_debug(e.stderr, file=sys.stderr)
- print_error(f"Builing {self.name} failed")
- shutil.rmtree(self.dir, ignore_errors=True)
- raise e
+ try:
+ run_cmd(cmd, cwd=BUILDDIR, shell=True)
+ except CalledProcessError as e:
+ print_debug(e.stderr, file=sys.stderr)
+ print_error(f"Builing {self.name} failed")
+ shutil.rmtree(self.dir, ignore_errors=True)
+ raise e
with open(buildtimestamp_path, "w") as buildtimestamp_file:
print_info2("Save build time to:", buildtimestamp_path)