mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-22 03:16:12 +01:00
Fix unhandled exceptions with '<' not being correctly displayed
This commit is contained in:
parent
2156225048
commit
079a47cf81
1 changed files with 2 additions and 2 deletions
|
|
@ -10,7 +10,7 @@
|
|||
QObject)
|
||||
from calibre.utils.config import OptionParser
|
||||
from calibre.gui2 import error_dialog
|
||||
from calibre import prints, as_unicode
|
||||
from calibre import prints, as_unicode, prepare_string_for_xml
|
||||
from polyglot.io import PolyglotStringIO
|
||||
|
||||
|
||||
|
|
@ -144,7 +144,7 @@ def unhandled_exception(self, exc_type, value, tb):
|
|||
if getattr(value, 'locking_debug_msg', None):
|
||||
prints(value.locking_debug_msg, file=sio)
|
||||
fe = sio.getvalue()
|
||||
msg = '<b>%s</b>:'%exc_type.__name__ + as_unicode(value)
|
||||
msg = '<b>%s</b>:'%exc_type.__name__ + prepare_string_for_xml(as_unicode(value))
|
||||
error_dialog(self, _('Unhandled exception'), msg, det_msg=fe,
|
||||
show=True)
|
||||
prints(fe, file=sys.stderr)
|
||||
|
|
|
|||
Loading…
Reference in a new issue