mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-18 03:10:58 +00:00
trezorctl: bad call to click.echo (fixes #304)
This commit is contained in:
parent
2d7c74c535
commit
2b02af1126
11
trezorctl
11
trezorctl
@ -96,6 +96,7 @@ class UnderscoreAgnosticGroup(click.Group):
|
|||||||
This implementation of `click.Group` responds to underscore_commands by invoking
|
This implementation of `click.Group` responds to underscore_commands by invoking
|
||||||
the respective dash-command.
|
the respective dash-command.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def get_command(self, ctx, cmd_name):
|
def get_command(self, ctx, cmd_name):
|
||||||
cmd = super().get_command(ctx, cmd_name)
|
cmd = super().get_command(ctx, cmd_name)
|
||||||
if cmd is None:
|
if cmd is None:
|
||||||
@ -522,18 +523,14 @@ def firmware_update(connect, filename, url, version, skip_check, fingerprint):
|
|||||||
elif url:
|
elif url:
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
click.echo("Downloading from", url)
|
click.echo("Downloading from {}".format(url))
|
||||||
r = requests.get(url)
|
r = requests.get(url)
|
||||||
fp = r.content
|
fp = r.content
|
||||||
else:
|
else:
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
r = requests.get(
|
url = "https://wallet.trezor.io/data/firmware/{}/releases.json"
|
||||||
"https://wallet.trezor.io/data/firmware/{}/releases.json".format(
|
releases = requests.get(url.format(firmware_version)).json()
|
||||||
firmware_version
|
|
||||||
)
|
|
||||||
)
|
|
||||||
releases = r.json()
|
|
||||||
|
|
||||||
def version_func(r):
|
def version_func(r):
|
||||||
return r["version"]
|
return r["version"]
|
||||||
|
Loading…
Reference in New Issue
Block a user