mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
Ignore some python warnings for now
shhhh Qt5
This commit is contained in:
parent
fadfb3562a
commit
f0e53db254
@ -59,7 +59,16 @@ warnings.simplefilter('default')
|
|||||||
warnings.filterwarnings("ignore", "the sets module is deprecated")
|
warnings.filterwarnings("ignore", "the sets module is deprecated")
|
||||||
|
|
||||||
|
|
||||||
|
ignorelist = [
|
||||||
|
"objcreator.py:152: DeprecationWarning: 'U' mode is deprecated"
|
||||||
|
"DeprecationWarning: the imp module is deprecated in favour of importlib;"
|
||||||
|
]
|
||||||
|
|
||||||
def showWarning(message, category, filename, lineno, file=None, line=None):
|
def showWarning(message, category, filename, lineno, file=None, line=None):
|
||||||
|
for ignore in ignorelist:
|
||||||
|
if ignore in message:
|
||||||
|
return
|
||||||
|
|
||||||
stk = ""
|
stk = ""
|
||||||
for s in traceback.format_stack()[:-2]:
|
for s in traceback.format_stack()[:-2]:
|
||||||
if hasattr(s, 'decode'):
|
if hasattr(s, 'decode'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user