mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
catch unicode errors in debug console (#545)
This commit is contained in:
parent
5e8f45f7e5
commit
827ed998ea
1 changed files with 4 additions and 1 deletions
|
@ -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 a new issue