From ed7fc99ff17aaf6b2eee73f0a44dbd49bbb696bb Mon Sep 17 00:00:00 2001 From: Ian Burgwin Date: Sun, 12 Jul 2020 21:16:25 -0700 Subject: [PATCH] gui: properly print args on exception in execute_script --- gui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui.py b/gui.py index 03162ba..cd1a609 100644 --- a/gui.py +++ b/gui.py @@ -416,8 +416,8 @@ class gui(tk.Tk): def execute_script(args_extra, printer): """Wrapper function to pipe install script output to a printer""" + args = [sys.executable, '-u', os.path.join(os.path.dirname(__file__), "custominstall.py")] try: - args = [sys.executable, '-u', os.path.join(os.path.dirname(__file__), "custominstall.py")] args.extend(args_extra) p = subprocess.Popen(args, stdout=subprocess.PIPE, @@ -430,7 +430,7 @@ def execute_script(args_extra, printer): printer(line) p.wait() except Exception as e: - printer(f"Error while executing script with args - {argstring} | Exception - {e}\n") + printer(f"Error while executing script with args - {args} | Exception - {e}\n") t = threader_object()