[FIX] hw_escpos: don't try too hard to close a printer

Although it might be a good idea to make sure a printer device is
properly closed, trying for >1 min to do so is too much. It can cause a
>1 min delay between receiving a receipt and actually printing. Also,
just because the device is not cleanly closed does not mean that it will
not work when we open it again.
This commit is contained in:
Joren Van Onder 2015-09-16 14:57:08 +02:00
parent 1440dc1c96
commit ad727be267
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ class Usb(Escpos):
return True
except usb.core.USBError as e:
i += 1
if i > 100:
if i > 10:
return False
sleep(0.1)