Add missing .upper() for function type

This commit is contained in:
Davis Goglin 2016-03-08 09:17:47 -08:00
parent 39d1c1d587
commit 9d12c7faab
1 changed files with 1 additions and 1 deletions

View File

@ -421,7 +421,7 @@ class Escpos(object):
else: # DEFAULT POSITION: BELOW else: # DEFAULT POSITION: BELOW
self._raw(BARCODE_TXT_BLW) self._raw(BARCODE_TXT_BLW)
bc_types = BARCODE_TYPES[function_type] bc_types = BARCODE_TYPES[function_type.upper()]
if bc.upper() not in bc_types.keys(): if bc.upper() not in bc_types.keys():
# TODO: Raise a better error, or fix the message of this error type # TODO: Raise a better error, or fix the message of this error type
raise BarcodeTypeError("Barcode type {bc} not valid for barcode function type {function_type}".format( raise BarcodeTypeError("Barcode type {bc} not valid for barcode function type {function_type}".format(