Merge branch 'development' into development
This commit is contained in:
commit
a30c28baa5
1
AUTHORS
1
AUTHORS
|
@ -36,4 +36,5 @@ Sergio Pulgarin
|
||||||
Stephan Sokolow
|
Stephan Sokolow
|
||||||
Thijs Triemstra
|
Thijs Triemstra
|
||||||
Thomas van den Berg
|
Thomas van den Berg
|
||||||
|
Yaisel Hurtado
|
||||||
ysuolmai
|
ysuolmai
|
||||||
|
|
|
@ -8,15 +8,12 @@
|
||||||
:license: MIT
|
:license: MIT
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||||
from __future__ import division
|
|
||||||
from __future__ import print_function
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
import usb.core
|
|
||||||
import usb.util
|
|
||||||
import serial
|
import serial
|
||||||
import socket
|
import socket
|
||||||
|
import usb.core
|
||||||
|
import usb.util
|
||||||
|
|
||||||
from .escpos import Escpos
|
from .escpos import Escpos
|
||||||
from .exceptions import USBNotFoundError
|
from .exceptions import USBNotFoundError
|
||||||
|
@ -83,6 +80,8 @@ class Usb(Escpos):
|
||||||
if check_driver is None or check_driver:
|
if check_driver is None or check_driver:
|
||||||
try:
|
try:
|
||||||
self.device.detach_kernel_driver(0)
|
self.device.detach_kernel_driver(0)
|
||||||
|
except NotImplementedError:
|
||||||
|
pass
|
||||||
except usb.core.USBError as e:
|
except usb.core.USBError as e:
|
||||||
if check_driver is not None:
|
if check_driver is not None:
|
||||||
print("Could not detatch kernel driver: {0}".format(str(e)))
|
print("Could not detatch kernel driver: {0}".format(str(e)))
|
||||||
|
@ -349,6 +348,7 @@ class Dummy(Escpos):
|
||||||
_WIN32PRINT = False
|
_WIN32PRINT = False
|
||||||
try:
|
try:
|
||||||
import win32print
|
import win32print
|
||||||
|
|
||||||
_WIN32PRINT = True
|
_WIN32PRINT = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue