From c1e45ab9992ae38abba310227deec172bd165d9e Mon Sep 17 00:00:00 2001 From: Nathan Zadoks Date: Thu, 23 Jun 2011 13:20:11 +0200 Subject: [PATCH] Added a little error handling to the connection bit --- calibrateextruder.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/calibrateextruder.py b/calibrateextruder.py index a624fd5..53d73a6 100644 --- a/calibrateextruder.py +++ b/calibrateextruder.py @@ -82,7 +82,11 @@ print "Serial port: %s"%(port if port else 'auto') #Connect to printer w("Connecting to printer..") -p=printcore(port,115200) +try: + p=printcore(port,115200) +except: + print 'Error.' + raise while not p.online: time.sleep(1) w('.')