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:
@@ -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):
|
||||
|
Reference in New Issue
Block a user