mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 09:28:31 -04:00
Tools: uploader.py: correct silently dropped exception in failure case
uploader.INFO_BL_REV is string, not integer
This commit is contained in:
parent
3a0329822a
commit
b298477266
@ -572,7 +572,7 @@ class uploader(object):
|
|||||||
# get the bootloader protocol ID first
|
# get the bootloader protocol ID first
|
||||||
self.bl_rev = self.__getInfo(uploader.INFO_BL_REV)
|
self.bl_rev = self.__getInfo(uploader.INFO_BL_REV)
|
||||||
if (self.bl_rev < uploader.BL_REV_MIN) or (self.bl_rev > uploader.BL_REV_MAX):
|
if (self.bl_rev < uploader.BL_REV_MIN) or (self.bl_rev > uploader.BL_REV_MAX):
|
||||||
print("Unsupported bootloader protocol %d" % uploader.INFO_BL_REV)
|
print("Unsupported bootloader protocol %d" % self.bl_rev)
|
||||||
raise RuntimeError("Bootloader protocol mismatch")
|
raise RuntimeError("Bootloader protocol mismatch")
|
||||||
|
|
||||||
self.board_type = self.__getInfo(uploader.INFO_BOARD_ID)
|
self.board_type = self.__getInfo(uploader.INFO_BOARD_ID)
|
||||||
|
Loading…
Reference in New Issue
Block a user