Fix crash caused by serial error with fiveD firmware on resend request.

master
Kliment 2011-08-22 12:09:39 +02:00
parent 291aac90e5
commit 1307f9801b
1 changed files with 5 additions and 1 deletions

View File

@ -115,7 +115,11 @@ class printcore():
#callback for errors
pass
if "resend" in line.lower() or "rs" in line:
toresend=int(line.replace("N:"," ").replace("N"," ").replace(":"," ").split()[-1])
try:
toresend=int(line.replace("N:"," ").replace("N"," ").replace(":"," ").split()[-1])
except:
if "rs" in line:
toresend=int(line.split()[1])
self.resendfrom=toresend
self.clear=True
self.clear=True