catch unicode errors in debug console (#545)
This commit is contained in:
parent
5e8f45f7e5
commit
827ed998ea
@ -981,7 +981,10 @@ will be lost. Continue?"""))
|
||||
buf += ">>> %s\n" % line
|
||||
else:
|
||||
buf += "... %s\n" % line
|
||||
frm.log.appendPlainText(buf + (self._output or "<no output>"))
|
||||
try:
|
||||
frm.log.appendPlainText(buf + (self._output or "<no output>"))
|
||||
except UnicodeDecodeError:
|
||||
frm.log.appendPlainText(_("<non-unicode text>"))
|
||||
frm.log.ensureCursorVisible()
|
||||
|
||||
# System specific code
|
||||
|
Loading…
Reference in New Issue
Block a user