mirror of https://gitlab.com/baco/winsysinfo.git
Minor change in gathering of registry keys for devices
Instead of appending keys into a list and then convert it into a set, keys are stored directly into a set.
This commit is contained in:
parent
138debf112
commit
ddb57b267e
|
@ -42,7 +42,7 @@ class SystemInformation:
|
|||
'ProcessorNameString')
|
||||
|
||||
def _graphics(self):
|
||||
reg_keys = []
|
||||
reg_keys = set()
|
||||
for device in range(16):
|
||||
try:
|
||||
video_card_string = get_registry_value(
|
||||
|
@ -57,12 +57,12 @@ class SystemInformation:
|
|||
'{}\\Video'.format(reg_key),
|
||||
'Service')
|
||||
if service == 'vga':
|
||||
reg_keys.append(reg_key)
|
||||
reg_keys.add(reg_key)
|
||||
except:
|
||||
pass
|
||||
|
||||
video_cards = []
|
||||
for video_card in set(reg_keys):
|
||||
for video_card in reg_keys:
|
||||
device_descrption = get_registry_value(
|
||||
'HKEY_LOCAL_MACHINE',
|
||||
'SYSTEM\\CurrentControlSet\\Control\\Video\\'
|
||||
|
|
Loading…
Reference in New Issue