From 870144aac6ca03ed3b0a823a13c5190567196072 Mon Sep 17 00:00:00 2001 From: Dean Rispin Date: Tue, 1 Mar 2016 16:34:21 -0800 Subject: [PATCH] Simplify variable checking on width and height values --- escpos/escpos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escpos/escpos.py b/escpos/escpos.py index 1b90b91..8944633 100644 --- a/escpos/escpos.py +++ b/escpos/escpos.py @@ -492,7 +492,7 @@ class Escpos(object): self._raw(TXT_2WIDTH) elif width == 1 and height == 1: self._raw(TXT_NORMAL) - elif width >= 1 and width <= 8 and height >= 1 and height <= 8 and isinstance(width, int) and isinstance(height, int): + elif 1 <= width <= 8 and 1 <= height <= 8 and isinstance(width, int) and isinstance(height, int): self._raw(TXT_SIZE + chr(TXT_WIDTH[width] + TXT_HEIGHT[height])) else: raise SetVariableError()