From 27f3d910b4c779922c9396867d5a8ecd7493e732 Mon Sep 17 00:00:00 2001 From: Oskar Weigl Date: Tue, 11 Jul 2017 00:14:25 -0700 Subject: [PATCH] usb kernel driver n/a on windows --- tools/odrive/usbbulk.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/odrive/usbbulk.py b/tools/odrive/usbbulk.py index 7a48cd2e..e2c2d66c 100644 --- a/tools/odrive/usbbulk.py +++ b/tools/odrive/usbbulk.py @@ -60,9 +60,12 @@ class ODriveBulkDevice(): try: string = "" # detach kernel driver - if self.dev.is_kernel_driver_active(1): - self.dev.detach_kernel_driver(1) - string += "Detached Kernel Driver\n" + try: + if self.dev.is_kernel_driver_active(1): + self.dev.detach_kernel_driver(1) + string += "Detached Kernel Driver\n" + except NotImplementedError: + pass #is_kernel_driver_active not implemented on Windows # set the active configuration. With no arguments, the first # configuration will be the active one self.dev.set_configuration()