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