From 32af57e2c97afdde585c511acd97ed812c3377e5 Mon Sep 17 00:00:00 2001 From: anduck Date: Wed, 9 Nov 2016 23:12:44 +0200 Subject: [PATCH 1/2] Change atleast_version to return 1 or 0 --- plugins/trezor/clientbase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/trezor/clientbase.py b/plugins/trezor/clientbase.py index 1eec31a5..a8e77672 100644 --- a/plugins/trezor/clientbase.py +++ b/plugins/trezor/clientbase.py @@ -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): From 064535c27ddea94d672c4b7573f3e13b47cbc978 Mon Sep 17 00:00:00 2001 From: anduck Date: Wed, 9 Nov 2016 23:14:25 +0200 Subject: [PATCH 2/2] Update plugin.py --- plugins/trezor/plugin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/trezor/plugin.py b/plugins/trezor/plugin.py index 2f874f94..14270ceb 100644 --- a/plugins/trezor/plugin.py +++ b/plugins/trezor/plugin.py @@ -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