From 0edfd8ce09ecf448dfbcb32afe2df85e748bde6e Mon Sep 17 00:00:00 2001 From: George Hotz Date: Tue, 12 Sep 2017 20:53:40 -0700 Subject: [PATCH] add to dfu as well --- panda/dfu.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/panda/dfu.py b/panda/dfu.py index 79cb95a9..079e1e12 100644 --- a/panda/dfu.py +++ b/panda/dfu.py @@ -31,12 +31,15 @@ class PandaDFU(object): def list(): context = usb1.USBContext() dfu_serials = [] - for device in context.getDeviceList(skip_on_error=True): - if device.getVendorID() == 0x0483 and device.getProductID() == 0xdf11: - try: - dfu_serials.append(device._getASCIIStringDescriptor(3)) - except Exception: - pass + try: + for device in context.getDeviceList(skip_on_error=True): + if device.getVendorID() == 0x0483 and device.getProductID() == 0xdf11: + try: + dfu_serials.append(device._getASCIIStringDescriptor(3)) + except Exception: + pass + except Exception: + pass return dfu_serials @staticmethod