mirror of
https://github.com/ihaveamac/custom-install.git
synced 2025-12-10 22:55:04 +00:00
gui: properly print args on exception in execute_script
This commit is contained in:
4
gui.py
4
gui.py
@@ -416,8 +416,8 @@ class gui(tk.Tk):
|
|||||||
|
|
||||||
def execute_script(args_extra, printer):
|
def execute_script(args_extra, printer):
|
||||||
"""Wrapper function to pipe install script output to a 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:
|
try:
|
||||||
args = [sys.executable, '-u', os.path.join(os.path.dirname(__file__), "custominstall.py")]
|
|
||||||
args.extend(args_extra)
|
args.extend(args_extra)
|
||||||
p = subprocess.Popen(args,
|
p = subprocess.Popen(args,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
@@ -430,7 +430,7 @@ def execute_script(args_extra, printer):
|
|||||||
printer(line)
|
printer(line)
|
||||||
p.wait()
|
p.wait()
|
||||||
except Exception as e:
|
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()
|
t = threader_object()
|
||||||
|
|||||||
Reference in New Issue
Block a user