Skip to content
Snippets Groups Projects
Commit ac05e57a authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

fix decode error in latex errors. Fixes #4744

parent 5e2c8da5
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,7 @@ log = logging.getLogger('gajim.c.latex') ...@@ -37,6 +37,7 @@ log = logging.getLogger('gajim.c.latex')
import gajim import gajim
from exceptions import LatexError from exceptions import LatexError
import helpers
# some latex commands are really bad # some latex commands are really bad
blacklist = ['\\def', '\\let', '\\futurelet', blacklist = ['\\def', '\\let', '\\futurelet',
...@@ -121,7 +122,7 @@ def latex_to_image(str_): ...@@ -121,7 +122,7 @@ def latex_to_image(str_):
except Exception, e: except Exception, e:
exitcode = _('Error executing "%(command)s": %(error)s') % { exitcode = _('Error executing "%(command)s": %(error)s') % {
'command': 'latex --interaction=nonstopmode %s.tex' % tmpfile, 'command': 'latex --interaction=nonstopmode %s.tex' % tmpfile,
'error': str(e)} 'error': helpers.decode_string(e.message)}
if exitcode == 0: if exitcode == 0:
# convert dvi to png # convert dvi to png
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment