getMaxIndex hide unimportant errors
This commit is contained in:
parent
81cadece75
commit
5f1d2cc48a
@ -172,13 +172,18 @@ def getVersion(hkey,SOFTWARE):
|
||||
target["version"] = versionData
|
||||
|
||||
def getMaxIndex():
|
||||
subprocess.run([
|
||||
"wimlib-imagex","info",
|
||||
target["path"],"1"
|
||||
],check=True,stdout=subprocess.DEVNULL)
|
||||
|
||||
ind = 2
|
||||
while True:
|
||||
try:
|
||||
subprocess.run([
|
||||
"wimlib-imagex","info",
|
||||
target["path"],str(ind)
|
||||
],check=True)
|
||||
],check=True,stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL)
|
||||
ind += 1
|
||||
except Exception as e:
|
||||
target["maxIndex"] = ind - 1
|
||||
|
Loading…
Reference in New Issue
Block a user