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:
parent
91222b4687
commit
2363db721a
@ -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)
|
||||
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user