fix lint warnings

This commit is contained in:
Mike Kinney
2022-01-29 20:47:58 -08:00
parent 1fa61ece93
commit a0944961b5
3 changed files with 39 additions and 3 deletions

View File

@@ -66,3 +66,41 @@ Status Class FriendlyName
------ ----- ------------ ----------
Error CP2102 USB to UART Bridge Controller USB\VID_...
If need to install driver
Get-PnpDevice -DeviceID 'USB\VID_10C4&PID_EA60\0001' | Format-List
Caption : CP2102 USB to UART Bridge Controller
Description : CP2102 USB to UART Bridge Controller
InstallDate :
Name : CP2102 USB to UART Bridge Controller
Status : Error
Availability :
ConfigManagerErrorCode : CM_PROB_FAILED_INSTALL
ConfigManagerUserConfig : False
CreationClassName : Win32_PnPEntity
DeviceID : USB\VID_10C4&PID_EA60\0001
ErrorCleared :
ErrorDescription :
LastErrorCode :
PNPDeviceID : USB\VID_10C4&PID_EA60\0001
PowerManagementCapabilities :
PowerManagementSupported :
StatusInfo :
SystemCreationClassName : Win32_ComputerSystem
SystemName : DESKTOP-FRFQN8H
ClassGuid :
CompatibleID : {USB\Class_FF&SubClass_00&Prot_00, USB\Class_FF&SubClass_00, USB\Class_FF}
HardwareID : {USB\VID_10C4&PID_EA60&REV_0100, USB\VID_10C4&PID_EA60}
Manufacturer :
PNPClass :
Present : True
Service :
PSComputerName :
Class :
FriendlyName : CP2102 USB to UART Bridge Controller
InstanceId : USB\VID_10C4&PID_EA60\0001
Problem : CM_PROB_FAILED_INSTALL
ProblemDescription :

View File

@@ -180,7 +180,7 @@ def detect_windows_port(sd):
#print(f'command:{command}')
_, sp_output = subprocess.getstatusoutput(command)
#print(f'sp_output:{sp_output}')
p = re.compile('\(COM(.*)\)')
p = re.compile(r'\(COM(.*)\)')
for x in p.findall(sp_output):
#print(f'x:{x}')
ports.add(f'COM{x}')

View File

@@ -380,5 +380,3 @@ def detect_windows_needs_driver(sd, print_reason=False):
if print_reason:
print(sp_output)
return need_to_install_driver