Skip to content
Permalink
Browse files

Handle non-ascii characters in traceback when showing an exception

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14571 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Nov 12, 2010
1 parent cba89c3 commit 38d2c7df9ddadb0ebd9034956ba064c38bad0838
Showing with 1 addition and 1 deletion.
  1. +1 −1 python/utils.py
@@ -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))

0 comments on commit 38d2c7d

Please sign in to comment.
You can’t perform that action at this time.