From 79eb6bba627c4c70f24a265ac0b2ef9cbfbbd211 Mon Sep 17 00:00:00 2001 From: codefiles <11915375+codefiles@users.noreply.github.com> Date: Tue, 14 Mar 2023 16:24:15 -0400 Subject: Fix `exit_code` (#1679) --- archinstall/lib/general.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'archinstall') 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 -- cgit v1.2.3-70-g09d2