Skip to content

Commit

Permalink
show python errors in monospace
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Mar 21, 2014
1 parent 8c2fbbf commit 6685932
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/utils.py
Expand Up @@ -60,10 +60,10 @@ def showException(type, value, tb, msg):
lst = traceback.format_exception(type, value, tb)
if msg == None:
msg = QCoreApplication.translate('Python', 'An error has occured while executing Python code:')
txt = '<font color="red">%s</font><br><br>' % msg
txt = '<font color="red">%s</font><br><br><pre>' % msg
for s in lst:
txt += s.decode('utf-8', 'replace')
txt += '<br>%s<br>%s<br><br>' % (QCoreApplication.translate('Python','Python version:'), sys.version)
txt += '</pre><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_DEV_VERSION)
txt += '%s %s' % (QCoreApplication.translate('Python','Python path:'), str(sys.path))
txt = txt.replace('\n', '<br>')
Expand Down

0 comments on commit 6685932

Please sign in to comment.