1
0
mirror of https://github.com/python-escpos/python-escpos synced 2025-09-13 09:09:58 +00:00

Add sleep in sending fragments

Adding sleep prevents "USBTimeoutError: [Errno 110] Operation timed out".
This commit is contained in:
aerialist
2024-01-24 21:27:59 +09:00
committed by GitHub
parent 62c234f6f1
commit 7b97ff2e24

View File

@@ -13,6 +13,7 @@ from __future__ import annotations
import textwrap
import warnings
import time
from abc import ABCMeta, abstractmethod # abstract base class support
from re import match as re_match
from types import TracebackType
@@ -244,6 +245,7 @@ class Escpos(object, metaclass=ABCMeta):
impl=impl,
fragment_height=fragment_height,
)
time.sleep(0.3)
return
if impl == "bitImageRaster":