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

FIX abstractbaseclass in Escpos not properly loaded

* fixes #126
* adds a test to verify the patch
* uses a helperfunction of six in order to properly load ABCMeta in Python 2 and 3
This commit is contained in:
Patrick Kanzler
2016-04-03 22:16:03 +02:00
parent 2aa0878f54
commit 36debff72c
2 changed files with 31 additions and 1 deletions

View File

@@ -29,13 +29,13 @@ from .exceptions import *
from abc import ABCMeta, abstractmethod # abstract base class support
@six.add_metaclass(ABCMeta)
class Escpos(object):
""" ESC/POS Printer object
This class is the abstract base class for an esc/pos-printer. The printer implementations are children of this
class.
"""
__metaclass__ = ABCMeta
device = None
def __init__(self, columns=32):