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

fix stderr.write to use bytes

This commit is contained in:
Pavol Rusnak 2017-05-03 17:50:37 +02:00
parent 91222b4687
commit 2363db721a
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 2 additions and 2 deletions

View File

@ -591,7 +591,7 @@ def main():
print(res)
except CallException as e:
status, message = e.args
sys.stderr.write('failure: {message}\n'.format(message=message))
sys.stderr.write(b'failure: {message}\n'.format(message=message))
exit(status)

View File

@ -90,7 +90,7 @@ def pprint(msg):
return "<%s> (%d bytes):\n%s" % (msg_class, msg_size, msg)
def log(msg):
sys.stderr.write("%s\n" % msg)
sys.stderr.write(b'%s\n' % msg)
sys.stderr.flush()
class CallException(Exception):