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

Merge branch 'capabilities' into text-encoding

This commit is contained in:
Michael Elsdörfer
2016-08-30 18:02:40 +02:00
4 changed files with 14 additions and 1 deletions

View File

@@ -13,6 +13,9 @@ PROFILES = CAPABILITIES['profiles']
class NotSupported(Exception):
"""Raised if a requested feature is not suppored by the
printer profile.
"""
pass
@@ -38,7 +41,7 @@ class BaseProfile(object):
font = {'a': 0, 'b': 1}.get(font, font)
if not six.text_type(font) in self.fonts:
raise NotSupported(
'"%s" is not a valid font in the current profile' % font)
'"{}" is not a valid font in the current profile'.format(font))
return font
def get_columns(self, font):