Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorcodefiles <11915375+codefiles@users.noreply.github.com>2023-03-14 16:24:15 -0400
committerGitHub <noreply@github.com>2023-03-14 21:24:15 +0100
commit79eb6bba627c4c70f24a265ac0b2ef9cbfbbd211 (patch)
tree31b6694e6f441be88c0e572bf3cd317fc98d8b8f /archinstall
parentf0a6adb96dd388d62b2f6683709a8e310e6727c8 (diff)
Fix `exit_code` (#1679)
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/general.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py
index 5fd655a2..79693dcb 100644
--- a/archinstall/lib/general.py
+++ b/archinstall/lib/general.py
@@ -355,10 +355,12 @@ class SysCommandWorker:
if self.ended or (got_output is False and pid_exists(self.pid) is False):
self.ended = time.time()
try:
- self.exit_code = os.waitpid(self.pid, 0)[1]
+ wait_status = os.waitpid(self.pid, 0)[1]
+ self.exit_code = os.waitstatus_to_exitcode(wait_status)
except ChildProcessError:
try:
- self.exit_code = os.waitpid(self.child_fd, 0)[1]
+ wait_status = os.waitpid(self.child_fd, 0)[1]
+ self.exit_code = os.waitstatus_to_exitcode(wait_status)
except ChildProcessError:
self.exit_code = 1