From 9d12c7faab60e97273a5e069f23bba430d5256f6 Mon Sep 17 00:00:00 2001 From: Davis Goglin Date: Tue, 8 Mar 2016 09:17:47 -0800 Subject: [PATCH] Add missing .upper() for function type --- escpos/escpos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escpos/escpos.py b/escpos/escpos.py index f18b169..62c90b1 100644 --- a/escpos/escpos.py +++ b/escpos/escpos.py @@ -421,7 +421,7 @@ class Escpos(object): else: # DEFAULT POSITION: BELOW 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(): # 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(