mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix Mikero tools dupe key issue (#5853)
Mikero tools seams to not cleanup regkeys properly and leaves a key with no value behind making. Making find_depbo_tools break
This commit is contained in:
parent
bbda53ca1a
commit
5a4c439c22
@ -235,17 +235,19 @@ def find_depbo_tools():
|
||||
|
||||
for tool in requiredToolPaths:
|
||||
try:
|
||||
k = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Mikero\{}".format(tool))
|
||||
try:
|
||||
k = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Mikero\{}".format(tool))
|
||||
path = winreg.QueryValueEx(k, "exe")[0]
|
||||
except FileNotFoundError:
|
||||
k = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"Software\Mikero\{}".format(tool))
|
||||
path = winreg.QueryValueEx(k, "exe")[0]
|
||||
except FileNotFoundError:
|
||||
k = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"Software\Mikero\{}".format(tool))
|
||||
try:
|
||||
path = winreg.QueryValueEx(k, "exe")[0]
|
||||
print_error("Could not find {}".format(tool))
|
||||
failed = True
|
||||
else:
|
||||
#Strip any quotations from the path due to a MikeRo tool bug which leaves a trailing space in some of its registry paths.
|
||||
requiredToolPaths[tool] = path.strip('"')
|
||||
print_green("Found {}.".format(tool))
|
||||
except:
|
||||
print_error("Could not find {}".format(tool))
|
||||
failed = True
|
||||
finally:
|
||||
winreg.CloseKey(k)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user