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:
Dionisio E Alonso 2015-04-09 01:59:09 -03:00
parent 138debf112
commit ddb57b267e
1 changed files with 3 additions and 3 deletions

View File

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