Merge branch 'bugfix/fix_idf_monitor_unicode_path_crash' into 'master'

tools: handle exception in case of logging Unicode characters

Closes IDF-2867

See merge request espressif/esp-idf!12520
pull/6828/head
Ivan Grokhotkov 2021-03-29 19:21:01 +00:00
commit eec9e414d5
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -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):