Skip to content
Permalink
Browse files

Ignore some python warnings for now

shhhh Qt5
  • Loading branch information
NathanW2 committed Sep 4, 2017
1 parent fadfb35 commit f0e53db254f38071e87b993b580ea050b19f4b17
Showing with 9 additions and 0 deletions.
  1. +9 −0 python/utils.py
@@ -59,7 +59,16 @@
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'):

1 comment on commit f0e53db

@NathanW2

This comment has been minimized.

Copy link
Member Author

@NathanW2 NathanW2 commented on f0e53db Sep 4, 2017

Yes I am aware of filterwarnings but I didn't seem to work here for me. Will test more

Please sign in to comment.
You can’t perform that action at this time.