Skip to content
Browse files
Ignore some python warnings for now
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.
@@ -59,7 +59,16 @@
warnings.filterwarnings("ignore", "the sets module is deprecated")

ignorelist = [
" 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:

stk = ""
for s in traceback.format_stack()[:-2]:
if hasattr(s, 'decode'):

1 comment on commit f0e53db

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.