From 042ac8a6f548817b2fd06110cc752488389ebd14 Mon Sep 17 00:00:00 2001 From: Antoine van Gelder Date: Fri, 17 May 2024 11:55:01 +0200 Subject: [PATCH] comms: don't try to claim usb interface on Windows This addresses: https://github.com/greatscottgadgets/greatfet/issues/327 --- host/pygreat/comms_backends/usb.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/host/pygreat/comms_backends/usb.py b/host/pygreat/comms_backends/usb.py index 6d1b1c6..558fc93 100644 --- a/host/pygreat/comms_backends/usb.py +++ b/host/pygreat/comms_backends/usb.py @@ -145,6 +145,9 @@ def _hold_libgreat_interface(self, timeout=1000): # If we have EBUSY (linux) or EACCES (macos), or None (windows), try again. if e.errno in (errno.EBUSY, errno.EACCES, None): pass + # If we have None (windows), just return + elif e.errno in (None, ): + return else: raise