From 48e5fe2f394cbd82c92d479175d85edeedcd56b2 Mon Sep 17 00:00:00 2001 From: sinseman44 Date: Sun, 15 Nov 2020 09:25:18 +0000 Subject: [PATCH] test if gcode repo exists --- piplot/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/piplot/main.py b/piplot/main.py index ece59b3..abb37cc 100755 --- a/piplot/main.py +++ b/piplot/main.py @@ -68,6 +68,10 @@ def pg_ok_cb(channel): def init(): ''' init pins and display main menu ''' + if not os.path.exists(GCODE_REPO): + logging.error("Path {} doesn't exist".format(GCODE_REPO)) + sys.exit(1) + try: GPIO.setup(PG_UP, GPIO.IN) GPIO.setup(PG_DOWN, GPIO.IN)