1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 11:39:03 +00:00

more fixes

This commit is contained in:
Pavol Rusnak 2016-05-20 17:20:11 +02:00
parent 52ad4e9f0d
commit 021389efe8
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 5 additions and 2 deletions

View File

@ -96,7 +96,10 @@ class TestProtectCall(common.TrezorTest):
self.client.setup_debuglink(button=True, pin_correct=False)
def test_backoff(attempts, start):
expected = 0.2 * (2 ** attempts)
if attempts <= 1:
expected = 0.2
else:
expected = (2 ** (attempts - 2))
got = time.time() - start
msg = "Pin delay expected to be at least %s seconds, got %s" % (expected, got)

View File

@ -209,7 +209,7 @@ class Commands(object):
def firmware_update(self, args):
if args.file:
fp = open(args.file, 'r')
fp = open(args.file, 'rb').read()
elif args.url:
print("Downloading from", args.url)
r = requests.get(args.url)