mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 03:34:32 +02:00
idf_monitor: Fixed a bug where pressing a key that doesn't encode into
a proper ASCII character, terminated the monitor with an exception
This commit is contained in:
committed by
Ivan Grokhotkov
parent
8712fd3ccf
commit
5827fd8c71
@@ -292,6 +292,8 @@ class Monitor(object):
|
||||
self.serial.write(codecs.encode(key))
|
||||
except serial.SerialException:
|
||||
pass # this shouldn't happen, but sometimes port has closed in serial thread
|
||||
except UnicodeEncodeError:
|
||||
pass # this can happen if a non-ascii character was passed, ignoring
|
||||
|
||||
def handle_serial_input(self, data):
|
||||
# this may need to be made more efficient, as it pushes out a byte
|
||||
|
Reference in New Issue
Block a user