From 65d8adb0be8152100d4a81b60ad0e0ba31cb2fa3 Mon Sep 17 00:00:00 2001 From: matejcik Date: Fri, 10 Aug 2018 13:32:50 +0200 Subject: [PATCH] trezorlib: rename device.*_device to device.* --- trezorlib/client.py | 8 ++++---- trezorlib/device.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/trezorlib/client.py b/trezorlib/client.py index 577559c8a6..94858c5492 100644 --- a/trezorlib/client.py +++ b/trezorlib/client.py @@ -456,10 +456,10 @@ class ProtocolMixin(object): # Device functionality self_test = MovedTo(device.self_test) - wipe_device = MovedTo(device.wipe_device) - recovery_device = MovedTo(device.recovery_device) - reset_device = MovedTo(device.reset_device) - backup_device = MovedTo(device.backup_device) + wipe_device = MovedTo(device.wipe) + recovery_device = MovedTo(device.recover) + reset_device = MovedTo(device.reset) + backup_device = MovedTo(device.backup) load_device_by_mnemonic = MovedTo(device.load_device_by_mnemonic) load_device_by_xprv = MovedTo(device.load_device_by_xprv) diff --git a/trezorlib/device.py b/trezorlib/device.py index b5577b5f89..080355ddbc 100644 --- a/trezorlib/device.py +++ b/trezorlib/device.py @@ -86,14 +86,14 @@ def set_u2f_counter(client, u2f_counter): @expect(proto.Success, field="message") -def wipe_device(client): +def wipe(client): ret = client.call(proto.WipeDevice()) client.init_device() return ret @expect(proto.Success, field="message") -def recovery_device(client, word_count, passphrase_protection, pin_protection, label, language, type=proto.RecoveryDeviceType.ScrambledWords, expand=False, dry_run=False): +def recover(client, word_count, passphrase_protection, pin_protection, label, language, type=proto.RecoveryDeviceType.ScrambledWords, expand=False, dry_run=False): if client.features.initialized and not dry_run: raise RuntimeError("Device is initialized already. Call wipe_device() and try again.") @@ -123,7 +123,7 @@ def recovery_device(client, word_count, passphrase_protection, pin_protection, l @expect(proto.Success, field="message") @session -def reset_device(client, display_random, strength, passphrase_protection, pin_protection, label, language, u2f_counter=0, skip_backup=False): +def reset(client, display_random, strength, passphrase_protection, pin_protection, label, language, u2f_counter=0, skip_backup=False): if client.features.initialized: raise RuntimeError("Device is initialized already. Call wipe_device() and try again.") @@ -149,7 +149,7 @@ def reset_device(client, display_random, strength, passphrase_protection, pin_pr @expect(proto.Success, field="message") -def backup_device(client): +def backup(client): ret = client.call(proto.BackupDevice()) return ret