mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix unhandled exceptions with '<' not being correctly displayed
This commit is contained in:
parent
2156225048
commit
079a47cf81
@ -10,7 +10,7 @@ from PyQt5.Qt import (QMainWindow, QTimer, QAction, QMenu, QMenuBar, QIcon,
|
|||||||
QObject)
|
QObject)
|
||||||
from calibre.utils.config import OptionParser
|
from calibre.utils.config import OptionParser
|
||||||
from calibre.gui2 import error_dialog
|
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
|
from polyglot.io import PolyglotStringIO
|
||||||
|
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ class MainWindow(QMainWindow):
|
|||||||
if getattr(value, 'locking_debug_msg', None):
|
if getattr(value, 'locking_debug_msg', None):
|
||||||
prints(value.locking_debug_msg, file=sio)
|
prints(value.locking_debug_msg, file=sio)
|
||||||
fe = sio.getvalue()
|
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,
|
error_dialog(self, _('Unhandled exception'), msg, det_msg=fe,
|
||||||
show=True)
|
show=True)
|
||||||
prints(fe, file=sys.stderr)
|
prints(fe, file=sys.stderr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user