mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
add 'warning' to the respective python message log tab
This commit is contained in:
parent
6a3d0d83ea
commit
91ecc5f31b
@ -52,7 +52,7 @@ def showWarning(message, category, filename, lineno, file=None, line=None):
|
|||||||
stk += s.decode('utf-8', 'replace')
|
stk += s.decode('utf-8', 'replace')
|
||||||
QgsMessageLog.logMessage(
|
QgsMessageLog.logMessage(
|
||||||
"warning:%s\ntraceback:%s" % ( warnings.formatwarning(message, category, filename, lineno), stk),
|
"warning:%s\ntraceback:%s" % ( warnings.formatwarning(message, category, filename, lineno), stk),
|
||||||
QCoreApplication.translate( "Python", "Python" )
|
QCoreApplication.translate( "Python", "Python warning" )
|
||||||
)
|
)
|
||||||
warnings.showwarning = showWarning
|
warnings.showwarning = showWarning
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user