mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
tools: handle exception in case of logging Unicode characters
This commit is contained in:
parent
cf53feff6f
commit
e74fbf6608
@ -1041,6 +1041,9 @@ if os.name == 'nt':
|
|||||||
# Also possible for Windows to throw an OSError error if the data is invalid for the console
|
# Also possible for Windows to throw an OSError error if the data is invalid for the console
|
||||||
# (garbage bytes, etc)
|
# (garbage bytes, etc)
|
||||||
pass
|
pass
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
# In case of double byte Unicode characters display '?'
|
||||||
|
self.output.write('?')
|
||||||
|
|
||||||
def write(self, data):
|
def write(self, data):
|
||||||
if isinstance(data, bytes):
|
if isinstance(data, bytes):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user