test if gcode repo exists

This commit is contained in:
sinseman44
2020-11-15 09:25:18 +00:00
parent 887807f289
commit 48e5fe2f39

View File

@@ -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)