1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Fix exception dialog in Python 3

This commit is contained in:
Roderik Ploszek 2018-04-14 23:55:29 +02:00
parent 18bccf7dc7
commit 7518d36aab

View file

@ -29,6 +29,7 @@ import locale
from six.moves import tkinter
from . import ttk
from six.moves import tkinter_font
from six import PY2
import traceback
# PySol imports
@ -292,7 +293,9 @@ class MfxExceptionDialog(MfxMessageDialog):
(ex.errno, ex.strerror, repr(ex.filename))
else:
t = str(ex)
kw.text = text + unicode(t, errors='replace')
if PY2:
t = unicode(t, errors='replace')
kw.text = text + t
MfxMessageDialog.__init__(self, parent, title, **kw.getKw())