mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-16 11:28:14 +00:00
import requests only when really needed
This commit is contained in:
parent
bac91afca7
commit
92810a287f
@ -291,14 +291,15 @@ class Commands(object):
|
||||
return ret
|
||||
|
||||
def firmware_update(self, args):
|
||||
import requests
|
||||
if args.file:
|
||||
fp = open(args.file, 'rb').read()
|
||||
elif args.url:
|
||||
import requests
|
||||
print("Downloading from", args.url)
|
||||
r = requests.get(args.url)
|
||||
fp = r.content
|
||||
else:
|
||||
import requests
|
||||
r = requests.get('https://wallet.trezor.io/data/firmware/releases.json')
|
||||
releases = r.json()
|
||||
version = lambda r: r['version']
|
||||
|
Loading…
Reference in New Issue
Block a user