add 'warning' to the respective python message log tab

This commit is contained in:
Juergen E. Fischer 2014-02-24 02:03:42 +01:00
parent 6a3d0d83ea
commit 91ecc5f31b

View File

@ -52,7 +52,7 @@ def showWarning(message, category, filename, lineno, file=None, line=None):
stk += s.decode('utf-8', 'replace')
QgsMessageLog.logMessage(
"warning:%s\ntraceback:%s" % ( warnings.formatwarning(message, category, filename, lineno), stk),
QCoreApplication.translate( "Python", "Python" )
QCoreApplication.translate( "Python", "Python warning" )
)
warnings.showwarning = showWarning