Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Handle non-ascii characters in traceback when showing an exception
git-svn-id: http://svn.osgeo.org/qgis/trunk@14571 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Nov 12, 2010
1 parent 75a30c9 commit d027de3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/utils.py
Expand Up @@ -22,7 +22,7 @@ def showException(type, value, tb, msg):
msg = QCoreApplication.translate('Python', 'An error has occured while executing Python code:')
txt = '<font color="red">%s</font><br><br>' % msg
for s in lst:
txt += s
txt += s.decode('utf-8', 'replace')
txt += '<br>%s<br>%s<br><br>' % (QCoreApplication.translate('Python','Python version:'), sys.version)
txt += '<br>%s<br>%s %s, %s<br><br>' % (QCoreApplication.translate('Python','QGIS version:'), QGis.QGIS_VERSION, QGis.QGIS_RELEASE_NAME, QGis.QGIS_SVN_VERSION)
txt += '%s %s' % (QCoreApplication.translate('Python','Python path:'), str(sys.path))
Expand Down

0 comments on commit d027de3

Please sign in to comment.