Skip to content

Commit

Permalink
px_uploader: catch serial exception correctly
Browse files Browse the repository at this point in the history
Signed-off-by: Julian Oes <julian@oes.ch>
  • Loading branch information
julianoes committed May 20, 2024
1 parent e1b2d04 commit 7678d21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tools/px_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 7678d21

Please sign in to comment.