Correct a copy-paste error in getConnectionList

Contributes to #82
This commit is contained in:
Arjen Hiemstra 2015-07-09 16:31:06 +02:00
parent 20874d88ad
commit b458a4c6e3

View file

@ -282,13 +282,13 @@ class USBPrinterManager(QObject, SignalEmitter, Extension):
i = 0 i = 0
while True: while True:
values = winreg.EnumValue(key, i) values = winreg.EnumValue(key, i)
if not base_list or "USBSER" in values[0]: if not only_list_usb or "USBSER" in values[0]:
base_list += [values[1]] base_list += [values[1]]
i += 1 i += 1
except Exception as e: except Exception as e:
pass pass
else:
if base_list: if only_list_usb:
base_list = base_list + glob.glob("/dev/ttyUSB*") + glob.glob("/dev/ttyACM*") + glob.glob("/dev/cu.usb*") base_list = base_list + glob.glob("/dev/ttyUSB*") + glob.glob("/dev/ttyACM*") + glob.glob("/dev/cu.usb*")
base_list = filter(lambda s: "Bluetooth" not in s, base_list) # Filter because mac sometimes puts them in the list base_list = filter(lambda s: "Bluetooth" not in s, base_list) # Filter because mac sometimes puts them in the list
else: else: