Corrections to pull request 237.

Create a _read function in the Escpos abtract class, which throws a
NotImplementedError.
Rename the isOnline function.
This commit is contained in:
csoft2k 2017-07-22 11:57:49 +02:00
parent 548a4825f8
commit 0a1136f555

View File

@ -79,6 +79,9 @@ class Escpos(object):
""" """
pass pass
def _read(self, msg):
raise NotImplementedError();
def image(self, img_source, high_density_vertical=True, high_density_horizontal=True, impl="bitImageRaster", def image(self, img_source, high_density_vertical=True, high_density_horizontal=True, impl="bitImageRaster",
fragment_height=960): fragment_height=960):
""" Print an image """ Print an image
@ -744,7 +747,7 @@ class Escpos(object):
else: else:
return [8]; return [8];
def _isOnline(self): def isOnline(self):
status = self.queryStatus()[0]; status = self.queryStatus()[0];
return ((status & RT_MASK_ONLINE) == 0); return ((status & RT_MASK_ONLINE) == 0);