From 5ea0a6a766eebe785440ce722459a21be5e456dc Mon Sep 17 00:00:00 2001 From: Fierelier Date: Fri, 19 Jan 2024 21:47:52 +0100 Subject: [PATCH] Exit with errorlevel set --- api/opusnt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/opusnt.py b/api/opusnt.py index 95dcf22..bed3d73 100644 --- a/api/opusnt.py +++ b/api/opusnt.py @@ -66,7 +66,7 @@ def runReg(cmd,check = True): else: cmdStr = " ".join(cmd) cmdProc = subprocess.Popen(["cmd.exe"],stdin=subprocess.PIPE,stdout=subprocess.DEVNULL) - cmdProc.stdin.write((cmdStr + "\nexit\n").encode("utf-8")) + cmdProc.stdin.write((cmdStr + "\nexit %errorlevel%\n").encode("utf-8")) cmdProc.stdin.flush() rtn = cmdProc.wait() if rtn != 0: raise Exception @@ -265,4 +265,4 @@ def applyRegmap(rp): for path in target["regmap"]: if rp.startswith(path): return rp.replace(path,target["regmap"][path],1) - return rp \ No newline at end of file + return rp