Skip to content

Commit fbd4f60

Browse files
fix usb connect on macos (#2326)
fix claim on macos
1 parent 8922b48 commit fbd4f60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def usb_connect(cls, serial, claim=True, no_error=False):
274274
handle = device.open()
275275
if sys.platform not in ("win32", "cygwin", "msys", "darwin"):
276276
handle.setAutoDetachKernelDriver(True)
277-
if claim:
277+
if claim or sys.platform == "darwin":
278278
handle.claimInterface(0)
279279
# handle.setInterfaceAltSetting(0, 0) # Issue in USB stack
280280

0 commit comments

Comments
 (0)