Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2020-07-07 22:24:56 +0000
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-07-07 22:24:56 +0000
commit3b3456b6f9b3ddd6be5da6a8dad53243f6793c73 (patch)
tree851dc28a9f1f09a9bc695512aa5447d54fe5b8d5 /archinstall/lib
parent0bc24699c1aba583b1d98809321e2f726425f3fe (diff)
Added a raise on sys_command exit code being bad. Also updated readme to show how to test this locally
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/exceptions.py2
-rw-r--r--archinstall/lib/general.py5
2 files changed, 5 insertions, 2 deletions
diff --git a/archinstall/lib/exceptions.py b/archinstall/lib/exceptions.py
index 9d033147..68ba8750 100644
--- a/archinstall/lib/exceptions.py
+++ b/archinstall/lib/exceptions.py
@@ -3,4 +3,6 @@ class RequirementError(BaseException):
class DiskError(BaseException):
pass
class ProfileError(BaseException):
+ pass
+class SysCallError(BaseException):
pass \ No newline at end of file
diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py
index 88cfc047..31f81413 100644
--- a/archinstall/lib/general.py
+++ b/archinstall/lib/general.py
@@ -233,8 +233,9 @@ class sys_command():#Thread):
self.exit_code = 0
if self.exit_code != 0 and not self.kwargs['surpress_errors']:
- log(f"'{self.raw_cmd}' did not exit gracefully, exit code {self.exit_code}.", origin='spawn', level=3)
- log(self.trace_log.decode('UTF-8'), origin='spawn', level=3)
+ log(f"'{self.raw_cmd}' did not exit gracefully, exit code {self.exit_code}.")
+ log(self.trace_log.decode('UTF-8'))
+ raise SysCallError(f"'{self.raw_cmd}' did not exit gracefully, exit code {self.exit_code}.\n{self.trace_log.decode('UTF-8')}")
self.ended = time.time()
with open(f'{self.cwd}/trace.log', 'wb') as fh: