Merge pull request #2029 from anduck/patch-2

Trezor firmware version check bugfix and log on error
This commit is contained in:
ThomasV 2016-12-16 09:57:53 +01:00 committed by GitHub
commit 4e564651a5
2 changed files with 2 additions and 1 deletions

View File

@ -212,7 +212,7 @@ class TrezorClientBase(GuiMixin, PrintError):
return (f.major_version, f.minor_version, f.patch_version)
def atleast_version(self, major, minor=0, patch=0):
return cmp(self.firmware_version(), (major, minor, patch))
return cmp(self.firmware_version(), (major, minor, patch)) >= 0
@staticmethod
def wrapper(func):

View File

@ -126,6 +126,7 @@ class TrezorCompatiblePlugin(HW_PluginBase):
msg = (_('Outdated %s firmware for device labelled %s. Please '
'download the updated firmware from %s') %
(self.device, client.label(), self.firmware_URL))
self.print_error(msg)
handler.show_error(msg)
return None