waf: cope with serial exceptions in px_uploader.py

this allows the loader to continue on a USB removal/reinsert
This commit is contained in:
Andrew Tridgell 2018-01-12 19:17:58 +11:00
parent daa9eec836
commit e3f4860666

View File

@ -563,7 +563,10 @@ class uploader(object):
if self.baudrate_flightstack_idx >= len(self.baudrate_flightstack):
return False
self.port.baudrate = self.baudrate_flightstack[self.baudrate_flightstack_idx]
try:
self.port.baudrate = self.baudrate_flightstack[self.baudrate_flightstack_idx]
except Exception:
return False
return True