px_uploader: catch serial exception correctly

Signed-off-by: Julian Oes <julian@oes.ch>
This commit is contained in:
Julian Oes
2024-06-07 09:24:40 +12:00
parent 9dc3f6ea12
commit 9f07f2a076
+2 -2
View File
@@ -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