Skip to content

Commit

Permalink
Merge pull request pyusb#309 from ap--/libusb0-errno-enodata
Browse files Browse the repository at this point in the history
Fix errno.ENODATA not available on Windows/py27
  • Loading branch information
jonasmalacofilho committed Jun 15, 2020
2 parents c6c67d6 + 5ece7fa commit 60c8712
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion usb/backend/libusb0.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import usb._interop as _interop
import logging
import usb.libloader
from errno import ENODATA

__author__ = 'Wander Lairson Costa'

Expand Down Expand Up @@ -622,6 +621,7 @@ def reset_device(self, dev_handle):
def is_kernel_driver_active(self, dev_handle, intf):
if not hasattr(_lib, 'usb_get_driver_np'):
raise NotImplementedError(self.is_kernel_driver_active.__name__)
from errno import ENODATA
buf = usb.util.create_buffer(_USBFS_MAXDRIVERNAME + 1)
name, length = buf.buffer_info()
length *= buf.itemsize
Expand Down

0 comments on commit 60c8712

Please sign in to comment.