mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-15 12:08:59 +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