Skip to content
Permalink
Browse files

show python errors in monospace

  • Loading branch information
jef-n committed Mar 21, 2014
1 parent 8c2fbbf commit 6685932c09221ef72729324d2faecc3cb44a86db
Showing with 2 additions and 2 deletions.
  1. +2 −2 python/utils.py
@@ -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>')

0 comments on commit 6685932

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