diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-02-26 16:16:42 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-02-26 16:16:42 +0100 |
| commit | 0d06677043e485aa1366993e395c6fa85b600990 (patch) | |
| tree | a4f5481e5e060723072add544ab1204c32530b7e /src | |
| parent | e85f4882fe1e2a42b0fdac9f45588d4f424ebea7 (diff) | |
| download | allocbench-0d06677043e485aa1366993e395c6fa85b600990.tar.gz allocbench-0d06677043e485aa1366993e395c6fa85b600990.zip | |
remove useles check if self.build_cmds are true
Diffstat (limited to 'src')
| -rw-r--r-- | src/allocator.py | 19 |
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) |
