OSDN Git Service

Use "USB\" as the prefix for USB hardware ids (#2012).
authorrui Batista <ruiandrebatista@gmail.com>
Mon, 3 Dec 2012 10:46:15 +0000 (10:46 +0000)
committerrui Batista <ruiandrebatista@gmail.com>
Mon, 3 Dec 2012 10:46:15 +0000 (10:46 +0000)
source/brailleDisplayDrivers/brailleNote.py

index 4f54f5e..a7459bc 100644 (file)
@@ -95,7 +95,7 @@ class BrailleDisplayDriver(braille.BrailleDisplayDriver):
        @classmethod\r
        def _getUSBPorts(cls):\r
                return (p["port"] for p in hwPortUtils.listComPorts()\r
-                               if p["hardwareID"].startswith("USB") and any(p["hardwareID"][3:].startswith(id) for id in USB_IDS))\r
+                               if p["hardwareID"].startswith("USB\\") and any(p["hardwareID"][4:].startswith(id) for id in USB_IDS))\r
 \r
        @classmethod\r
        def _getBluetoothPorts(cls):\r