getMaxIndex hide unimportant errors

This commit is contained in:
Fierelier 2021-11-13 06:32:51 +01:00
parent 81cadece75
commit 5f1d2cc48a

View File

@ -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