Fix bug that was preventing detection of PRS500 on windows.

This commit is contained in:
Kovid Goyal 2008-01-11 00:19:45 +00:00
parent e83b6a58be
commit 6607497a5e

View File

@ -73,8 +73,8 @@ class DeviceScanner(object):
vid, pid = hex(device.VENDOR_ID)[2:], hex(device.PRODUCT_ID)[2:] vid, pid = hex(device.VENDOR_ID)[2:], hex(device.PRODUCT_ID)[2:]
if len(vid) < 4: vid = '0'+vid if len(vid) < 4: vid = '0'+vid
if len(pid) < 4: pid = '0'+pid if len(pid) < 4: pid = '0'+pid
if 'VID_'+vid in device_id and \ vid, pid = 'VID_'+vid.upper(), 'PID_'+pid.upper()
'PID_'+pid in device_id: if vid in device_id and pid in device_id:
return True return True
return False return False
else: else: