Exit with errorlevel set
This commit is contained in:
parent
b751765b0f
commit
5ea0a6a766
@ -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
|
||||
return rp
|
||||
|
Loading…
Reference in New Issue
Block a user