Refactor for clarity

This commit is contained in:
Joe Rickerby
2021-01-05 13:50:21 +00:00
parent a973ba9716
commit 46eb28791f
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -251,7 +251,7 @@ def build(options: BuildOptions) -> None:
docker.copy_out(container_output_dir, options.output_dir)
log.step_end()
except subprocess.CalledProcessError as error:
log.error(f'Command {error.cmd} failed with code {error.returncode}. {error.stdout}')
log.step_end_with_error(f'Command {error.cmd} failed with code {error.returncode}. {error.stdout}')
troubleshoot(options.package_dir, error)
exit(1)
+1 -1
View File
@@ -111,7 +111,7 @@ class Logger:
self.step_start_time = None
def error(self, error: Union[BaseException, str]) -> None:
def step_end_with_error(self, error: Union[BaseException, str]) -> None:
self.step_end(success=False)
print()
+1 -1
View File
@@ -359,5 +359,5 @@ def build(options: BuildOptions) -> None:
shutil.move(str(repaired_wheel), options.output_dir)
log.build_end()
except subprocess.CalledProcessError as error:
log.error(f'Command {error.cmd} failed with code {error.returncode}. {error.stdout}')
log.step_end_with_error(f'Command {error.cmd} failed with code {error.returncode}. {error.stdout}')
exit(1)
+1 -1
View File
@@ -330,5 +330,5 @@ def build(options: BuildOptions) -> None:
shutil.move(str(repaired_wheel), options.output_dir)
log.build_end()
except subprocess.CalledProcessError as error:
log.error(f'Command {error.cmd} failed with code {error.returncode}. {error.stdout}')
log.step_end_with_error(f'Command {error.cmd} failed with code {error.returncode}. {error.stdout}')
exit(1)