mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-07 00:15:48 -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")
|
||||
|
||||
|
||||
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):
|
||||
for ignore in ignorelist:
|
||||
if ignore in message:
|
||||
return
|
||||
|
||||
stk = ""
|
||||
for s in traceback.format_stack()[:-2]:
|
||||
if hasattr(s, 'decode'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user