From d984f728ccd6cc23c6445f5eeb0ffde03cb98d17 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Fri, 14 Jun 2019 23:00:19 +0200 Subject: More debug output --- archinstall.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'archinstall.py') diff --git a/archinstall.py b/archinstall.py index de546c3f..8e5ffca6 100644 --- a/archinstall.py +++ b/archinstall.py @@ -132,7 +132,11 @@ class sys_command(): return self.exec() def __leave__(self, *args, **kwargs): + if 'debug' in self.opts and self.opts['debug']: + print('[N] Leaving subsystem routine.') os.waitpid(self.pid, 0) + if 'debug' in self.opts and self.opts['debug']: + print('[N] (Bye bye!)') def exec(self): if not self.cmd[0][0] == '/': @@ -183,13 +187,16 @@ class sys_command(): print('[N] Last command finished, exiting subsystem.') alive = False break - yield output + if 'debug' in self.opts and self.opts['debug']: + print('[N] Exited subsystem, instructing it to shutdown.') # Since we're in a subsystem, we gotta bail out! # Bail bail bail! os.write(child_fd, b'shutdown now\n') + if 'debug' in self.opts and self.opts['debug']: + print('[N] Waiting for exit code.') exit_code = os.waitpid(self.pid, 0)[1] if exit_code != 0: @@ -198,6 +205,9 @@ class sys_command(): print('[?] Command executed: {}'.format(self.cmd)) exit(1) + if 'debug' in self.opts and self.opts['debug']: + print('[N] Subsystem routine complete.') + def simple_command(cmd, opts=None, *args, **kwargs): if not opts: opts = {} if 'debug' in opts: -- cgit v1.2.3-70-g09d2