Skip to content

Commit 6685932

Browse files
committed
show python errors in monospace
1 parent 8c2fbbf commit 6685932

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ def showException(type, value, tb, msg):
6060
lst = traceback.format_exception(type, value, tb)
6161
if msg == None:
6262
msg = QCoreApplication.translate('Python', 'An error has occured while executing Python code:')
63-
txt = '<font color="red">%s</font><br><br>' % msg
63+
txt = '<font color="red">%s</font><br><br><pre>' % msg
6464
for s in lst:
6565
txt += s.decode('utf-8', 'replace')
66-
txt += '<br>%s<br>%s<br><br>' % (QCoreApplication.translate('Python','Python version:'), sys.version)
66+
txt += '</pre><br>%s<br>%s<br><br>' % (QCoreApplication.translate('Python','Python version:'), sys.version)
6767
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)
6868
txt += '%s %s' % (QCoreApplication.translate('Python','Python path:'), str(sys.path))
6969
txt = txt.replace('\n', '<br>')

0 commit comments

Comments
 (0)