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:
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 . 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())
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue