mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-22 03:04:09 -04:00
Fix exception dialog in Python 3
This commit is contained in:
parent
18bccf7dc7
commit
7518d36aab
1 changed files with 4 additions and 1 deletions
|
@ -29,6 +29,7 @@ import locale
|
||||||
from six.moves import tkinter
|
from six.moves import tkinter
|
||||||
from . import ttk
|
from . import ttk
|
||||||
from six.moves import tkinter_font
|
from six.moves import tkinter_font
|
||||||
|
from six import PY2
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
# PySol imports
|
# PySol imports
|
||||||
|
@ -292,7 +293,9 @@ class MfxExceptionDialog(MfxMessageDialog):
|
||||||
(ex.errno, ex.strerror, repr(ex.filename))
|
(ex.errno, ex.strerror, repr(ex.filename))
|
||||||
else:
|
else:
|
||||||
t = str(ex)
|
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())
|
MfxMessageDialog.__init__(self, parent, title, **kw.getKw())
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue