1
0

updates for python3

This commit is contained in:
ThomasV
2017-03-15 12:13:20 +01:00
parent 65aeb0bd3c
commit ab15ff3a00
27 changed files with 50 additions and 51 deletions

View File

@@ -1,5 +1,5 @@
from trezorlib.client import proto, BaseClient, ProtocolMixin
from clientbase import TrezorClientBase
from .clientbase import TrezorClientBase
class TrezorClient(TrezorClientBase, ProtocolMixin, BaseClient):
def __init__(self, transport, handler, plugin):

View File

@@ -209,7 +209,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)) >= 0
return self.firmware_version() >= (major, minor, patch)
@staticmethod
def wrapper(func):

View File

@@ -10,7 +10,7 @@ from ..hw_wallet.qt import QtHandlerBase, QtPluginBase
from electrum.i18n import _
from electrum.plugins import hook, DeviceMgr
from electrum.util import PrintError, UserCancelled
from electrum.util import PrintError, UserCancelled, bh2u
from electrum.wallet import Wallet, Standard_Wallet
PASSPHRASE_HELP_SHORT =_(
@@ -320,7 +320,7 @@ class SettingsDialog(WindowModalDialog):
def update(features):
self.features = features
set_label_enabled()
bl_hash = features.bootloader_hash.encode('hex')
bl_hash = bh2u(features.bootloader_hash)
bl_hash = "\n".join([bl_hash[:32], bl_hash[32:]])
noyes = [_("No"), _("Yes")]
endis = [_("Enable Passphrases"), _("Disable Passphrases")]

View File

@@ -13,7 +13,7 @@ class TrezorPlugin(TrezorCompatiblePlugin):
def __init__(self, *args):
try:
import client
from . import client
import trezorlib
import trezorlib.ckd_public
import trezorlib.transport_hid