1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-03 12:00:59 +00:00

python: simplify outdated firmware warning (full message is still used in the exception)

This commit is contained in:
matejcik 2020-03-24 16:03:41 +01:00
parent f52c087cb6
commit 2402853b9c

View File

@ -257,7 +257,7 @@ class TrezorClient:
def check_firmware_version(self, warn_only=False): def check_firmware_version(self, warn_only=False):
if self.is_outdated(): if self.is_outdated():
if warn_only: if warn_only:
warnings.warn(OUTDATED_FIRMWARE_ERROR, stacklevel=2) warnings.warn("Firmware is out of date", stacklevel=2)
else: else:
raise exceptions.OutdatedFirmwareError(OUTDATED_FIRMWARE_ERROR) raise exceptions.OutdatedFirmwareError(OUTDATED_FIRMWARE_ERROR)