Commit c1e45ab9 authored by Nathan Zadoks's avatar Nathan Zadoks

Added a little error handling to the connection bit

parent 9ad295c9
...@@ -82,7 +82,11 @@ print "Serial port: %s"%(port if port else 'auto') ...@@ -82,7 +82,11 @@ print "Serial port: %s"%(port if port else 'auto')
#Connect to printer #Connect to printer
w("Connecting to printer..") w("Connecting to printer..")
p=printcore(port,115200) try:
p=printcore(port,115200)
except:
print 'Error.'
raise
while not p.online: while not p.online:
time.sleep(1) time.sleep(1)
w('.') w('.')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment