tools: handle exception in case of logging Unicode characters

customer/11kv_v4.0_xiaomi
Juraj Michálek 2021-02-25 18:09:48 +01:00
rodzic acddb8fca2
commit 3d83ce6d7a
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -824,6 +824,9 @@ if os.name == 'nt':
# an exception (however, the character is still written to the screen)
# Ref https://github.com/espressif/esp-idf/issues/1136
pass
except UnicodeDecodeError:
# In case of double byte Unicode characters display '?'
self.output.write('?')
def write(self, data):
if isinstance(data, bytes):