diff options
| -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) |
