Minor fixes of firmware_update

This commit is contained in:
slush0 2015-04-09 21:13:35 +02:00
parent 4ffadc2216
commit 2f2ffd5239

View File

@ -226,11 +226,13 @@ class Commands(object):
fp.write(binascii.unhexlify(fp_old.read()))
fp_old.close()
fp.seek(0)
fp.seek(0)
if fp.read(4) != 'TRZR':
raise Exception("Trezor firmware header expected")
print "Please confirm action on device..."
fp.seek(0)
return self.client.firmware_update(fp=fp)