fix method 'def detect_serial_path():' on windows 10:

- changed line 399 to: if name.startswith(r'\DEVICE\LG') and (name.endswith('G1') or name.endwith('G2')):
- this condition prevented the script from finding my lg k10 250ds device that has the name in the registry \Device\LGSIDIAG1
This commit is contained in:
JunioJsv 2020-04-19 15:28:50 -03:00
parent 7eeac45d22
commit a52e4f00cd

View file

@ -396,7 +396,7 @@ def detect_serial_path():
name, value, value_type = winreg.EnumValue(key, i)
# match both \Device\LGANDNETDIAG1 and \Device\LGVZANDNETDIAG1
name = name.upper()
if name.startswith(r'\DEVICE\LG') and name.endswith('ANDNETDIAG1'):
if name.startswith(r'\DEVICE\LG') and (name.endswith('G1') or name.endwith('G2')):
return value
except OSError: pass
return None