mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
px_uploader: catch serial exception correctly
Signed-off-by: Julian Oes <julian@oes.ch>
This commit is contained in:
parent
e4fd80b6ef
commit
5bace785e0
@ -914,7 +914,7 @@ def main():
|
||||
print(f"Found board id: {up.board_type},{up.board_rev} bootloader protocol revision {up.bl_rev} on {port}")
|
||||
break
|
||||
|
||||
except RuntimeError or serial.SerialException:
|
||||
except (RuntimeError, serial.SerialException):
|
||||
|
||||
if not up.send_reboot(args.use_protocol_splitter_format):
|
||||
break
|
||||
@ -980,4 +980,4 @@ def main():
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
|
||||
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user