mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Exempt R1717 consideration
This commit is contained in:
parent
0f82ba3084
commit
00466719ea
@ -113,21 +113,25 @@ class Helpers:
|
||||
for jdk_key_path in jdk_key_paths:
|
||||
try:
|
||||
with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, jdk_key_path) as kjdk:
|
||||
kjdk_values = dict(
|
||||
[
|
||||
winreg.EnumValue(kjdk, i)[:2]
|
||||
for i in range(winreg.QueryInfoKey(kjdk)[1])
|
||||
]
|
||||
kjdk_values = (
|
||||
dict( # pylint: disable=consider-using-dict-comprehension
|
||||
[
|
||||
winreg.EnumValue(kjdk, i)[:2]
|
||||
for i in range(winreg.QueryInfoKey(kjdk)[1])
|
||||
]
|
||||
)
|
||||
)
|
||||
current_version = kjdk_values["CurrentVersion"]
|
||||
kjdk_current = winreg.OpenKey(
|
||||
winreg.HKEY_LOCAL_MACHINE, jdk_key_path + "\\" + current_version
|
||||
)
|
||||
kjdk_current_values = dict(
|
||||
[
|
||||
winreg.EnumValue(kjdk_current, i)[:2]
|
||||
for i in range(winreg.QueryInfoKey(kjdk_current)[1])
|
||||
]
|
||||
kjdk_current_values = (
|
||||
dict( # pylint: disable=consider-using-dict-comprehension
|
||||
[
|
||||
winreg.EnumValue(kjdk_current, i)[:2]
|
||||
for i in range(winreg.QueryInfoKey(kjdk_current)[1])
|
||||
]
|
||||
)
|
||||
)
|
||||
return kjdk_current_values["JavaHome"]
|
||||
except WindowsError as e: # pylint: disable=E0602
|
||||
|
Loading…
Reference in New Issue
Block a user