From cf5e06c192d0faab7ee2853d66b1b5d48afcfb74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Sat, 2 Jul 2022 00:49:02 +0200 Subject: [PATCH] added name error exception MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.py b/main.py index 558f73d..35ca627 100644 --- a/main.py +++ b/main.py @@ -212,6 +212,12 @@ if __name__ == '__main__': rainbowCycle(strip) elif mode == 1: + try: + r + except NameError: + r = "255" + g = "0" + b = "0" setColor(strip, Color(int(r), int(g), int(b))) time.sleep(1) else: