From 2d8a774b9f28b90b7f72f7aae37e3ce67854596a Mon Sep 17 00:00:00 2001 From: csoft2k Date: Sat, 22 Jul 2017 11:57:49 +0200 Subject: [PATCH] Corrections to pull request 237. Create a _read function in the Escpos abtract class, which throws a NotImplementedError. Rename the isOnline function. --- src/escpos/escpos.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/escpos/escpos.py b/src/escpos/escpos.py index 3639ea1..a1055ab 100644 --- a/src/escpos/escpos.py +++ b/src/escpos/escpos.py @@ -79,6 +79,9 @@ class Escpos(object): """ pass + def _read(self, msg): + raise NotImplementedError(); + def image(self, img_source, high_density_vertical=True, high_density_horizontal=True, impl="bitImageRaster", fragment_height=960): """ Print an image @@ -744,7 +747,7 @@ class Escpos(object): else: return [8]; - def _isOnline(self): + def isOnline(self): status = self.queryStatus()[0]; return ((status & RT_MASK_ONLINE) == 0);