mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
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
This commit is contained in:
parent
75a30c9387
commit
d027de3655
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user