Added a little error handling to the connection bit
parent
9ad295c931
commit
c1e45ab999
|
@ -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('.')
|
||||||
|
|
Loading…
Reference in New Issue