From 79b016b479cdff627c8ddc747b00856b1d82d4b1 Mon Sep 17 00:00:00 2001 From: Dave Lasley Date: Tue, 13 Dec 2016 12:00:24 -0800 Subject: [PATCH] [FIX] hw_telium_payment_terminal: Add guard for external import --- hw_telium_payment_terminal/controllers/main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw_telium_payment_terminal/controllers/main.py b/hw_telium_payment_terminal/controllers/main.py index d40232b0..27ae84cc 100644 --- a/hw_telium_payment_terminal/controllers/main.py +++ b/hw_telium_payment_terminal/controllers/main.py @@ -40,6 +40,12 @@ except (ImportError, IOError) as err: logger.debug(err) +try: + import pycountry +except ImportError: + _logger.info('`pycountry` Python package not found') + + class TeliumPaymentTerminalDriver(Thread): def __init__(self): Thread.__init__(self)