From f0e53db254f38071e87b993b580ea050b19f4b17 Mon Sep 17 00:00:00 2001 From: Nathan Woodrow Date: Mon, 4 Sep 2017 12:29:54 +1000 Subject: [PATCH] Ignore some python warnings for now shhhh Qt5 --- python/utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python/utils.py b/python/utils.py index 241af1ed48e..6b9f35b2688 100644 --- a/python/utils.py +++ b/python/utils.py @@ -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'):