mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-23 06:48:16 +00:00
drop FirmwareUpdate.force field
This commit is contained in:
parent
624d500c84
commit
f863e1e602
3
cmd.py
3
cmd.py
@ -121,7 +121,7 @@ class Commands(object):
|
||||
raise Exception("Trezor firmware header expected")
|
||||
|
||||
fp.seek(0)
|
||||
return self.client.firmware_update(fp=open(args.file, 'r'), force=args.force)
|
||||
return self.client.firmware_update(fp=open(args.file, 'r'))
|
||||
|
||||
list.help = 'List connected Trezor USB devices'
|
||||
ping.help = 'Send ping message'
|
||||
@ -164,7 +164,6 @@ class Commands(object):
|
||||
|
||||
firmware_update.arguments = (
|
||||
(('-f', '--file'), {'type': str}),
|
||||
(('-o', '--force'), {'type': bool, 'default': False})
|
||||
)
|
||||
|
||||
def list_usb():
|
||||
|
@ -350,8 +350,7 @@ message TxOutput {
|
||||
//
|
||||
|
||||
message FirmwareUpdate {
|
||||
required bool force = 1; // Force update, suppress message about wiping storage area
|
||||
required bytes payload = 2 [(binary) = true]; // Firmware to flash into device
|
||||
required bytes payload = 1 [(binary) = true]; // Firmware to flash into device
|
||||
}
|
||||
|
||||
// ****************************************************************************
|
||||
|
@ -260,11 +260,11 @@ class TrezorClient(object):
|
||||
self.init_device()
|
||||
return isinstance(resp, proto.Success)
|
||||
|
||||
def firmware_update(self, fp, force=False):
|
||||
def firmware_update(self, fp):
|
||||
if self.features.bootloader_mode == False:
|
||||
raise Exception("Device must be in bootloader mode")
|
||||
|
||||
resp = self.call(proto.FirmwareUpdate(force=force, payload=fp.read()))
|
||||
resp = self.call(proto.FirmwareUpdate(payload=fp.read()))
|
||||
if isinstance(resp, proto.Success):
|
||||
return True
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user