forked from Archive/PX4-Autopilot
px_uploader: fix SerialException error
Sometimes right after reboot, we got a `raise SerialException( msg.errno, "could not open port {}: {}".format(self._port, msg))`. If this happens now, we will just try again later.
This commit is contained in:
parent
b0a8073e15
commit
090d7ebd6b
|
@ -214,6 +214,10 @@ class uploader(object):
|
|||
except OSError:
|
||||
# wait for the port to be ready
|
||||
time.sleep(0.04)
|
||||
except serial.SerialException:
|
||||
# if open fails, try again later
|
||||
time.sleep(0.04)
|
||||
|
||||
else:
|
||||
break
|
||||
|
||||
|
|
Loading…
Reference in New Issue