Merge pull request #330 from om26er/windows-support
Enable Windows Support
This commit is contained in:
commit
40b30225d3
1
AUTHORS
1
AUTHORS
|
@ -21,6 +21,7 @@ Michael Billington
|
||||||
Michael Elsdörfer
|
Michael Elsdörfer
|
||||||
mrwunderbar666
|
mrwunderbar666
|
||||||
Nathan Bookham
|
Nathan Bookham
|
||||||
|
Omer Akram
|
||||||
Patrick Kanzler
|
Patrick Kanzler
|
||||||
primax79
|
primax79
|
||||||
Qian Linfeng
|
Qian Linfeng
|
||||||
|
|
|
@ -68,6 +68,11 @@ class Usb(Escpos):
|
||||||
self.idVendor = self.device.idVendor
|
self.idVendor = self.device.idVendor
|
||||||
self.idProduct = self.device.idProduct
|
self.idProduct = self.device.idProduct
|
||||||
|
|
||||||
|
# pyusb has three backends: libusb0, libusb1 and openusb but
|
||||||
|
# only libusb1 backend implements the methods is_kernel_driver_active()
|
||||||
|
# and detach_kernel_driver().
|
||||||
|
# This helps enable this library to work on Windows.
|
||||||
|
if self.device.backend.__module__.endswith("libusb1"):
|
||||||
check_driver = None
|
check_driver = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue