mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-09-29 04:18:54 +03:00
Workaround for a quite strange UnicodeDecodeError
Not really understood, but with level MSG_TRACE2, on a Curiosity Nano board, I get two instances of unicode decode errors within the trace messages. Trying to debug them did not yield any useful result, but catching the exception, and enforcing the type to be "str" appear to be able to continue. Maybe an internal bug of my Python interpreter, don't know.
This commit is contained in:
@@ -655,7 +655,11 @@ class adgui(QObject):
|
||||
if backslash_v and not self.at_bol[target]:
|
||||
s += "\n"
|
||||
s += msg
|
||||
self.at_bol[target] = s[-1] == '\n'
|
||||
try:
|
||||
self.at_bol[target] = s[-1] == '\n'
|
||||
except UnicodeDecodeError:
|
||||
s = str(s)
|
||||
self.at_bol[target] = s[-1] == '\n'
|
||||
self.log(s, msglvl, no_nl = True)
|
||||
|
||||
def progress_callback(self, percent: int, etime: float, hdr: str, finish: int):
|
||||
|
||||
Reference in New Issue
Block a user