Skip to content

Commit

Permalink
Ignore some python warnings for now
Browse files Browse the repository at this point in the history
shhhh Qt5
  • Loading branch information
NathanW2 committed Sep 4, 2017
1 parent fadfb35 commit f0e53db
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions python/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand Down

1 comment on commit f0e53db

@NathanW2
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Please sign in to comment.