From 227080f27980a611d62741ab1539a07a1c2688e5 Mon Sep 17 00:00:00 2001 From: Ingo Date: Thu, 2 Sep 2021 20:01:29 +0200 Subject: [PATCH] ENH: Exclusive configuration of a single display --- config.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index 6380257..aba8384 100644 --- a/config.py +++ b/config.py @@ -126,7 +126,7 @@ def create_config(config_file=None): sys.exit("Exiting...") # Display - Waveshare 2.13 is 250 * 122 pixels -if "waveshare" in conf["atm"]["display"]: +elif "waveshare2in13" in conf["atm"]["display"]: try: from waveshare_epd import epd2in13_V2 WAVESHARE = epd2in13_V2.EPD() @@ -135,7 +135,7 @@ def create_config(config_file=None): sys.exit("Exiting...") # Display - Waveshare 2.13 (D) is 212 * 104 pixels -if "waveshare2in13d" in conf["atm"]["display"]: +elif "waveshare2in13d" in conf["atm"]["display"]: try: from waveshare_epd import epd2in13d WAVESHARE = epd2in13d.EPD() @@ -143,6 +143,11 @@ def create_config(config_file=None): logger.warning("Waveshare display library not installed.") sys.exit("Exiting...") +# Display - No configuration match +else: + logger.warning("No display configuration match.") + sys.exit("Exiting...") + # API URL for coingecko COINGECKO_URL_BASE = "https://api.coingecko.com/api/v3/"