Added a little error handling to the connection bit

master
Nathan Zadoks 2011-06-23 13:20:11 +02:00
parent 9ad295c931
commit c1e45ab999
1 changed files with 5 additions and 1 deletions

View File

@ -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('.')