From 4e200653a081b0ffb402bb519ca556d9d7747882 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 5 Aug 2014 22:33:08 +0200 Subject: [PATCH] Enable python warnings with --debug --- qutebrowser/app.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qutebrowser/app.py b/qutebrowser/app.py index 1396b4942..db2529d00 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -25,6 +25,7 @@ import subprocess import faulthandler import configparser import signal +import warnings from bdb import BdbQuit from base64 import b64encode from functools import partial @@ -97,6 +98,10 @@ class Application(QApplication): Argument namespace from argparse. """ # pylint: disable=too-many-statements + if args.debug: + # We don't enable this earlier because some imports trigger + # warnings (which are not our fault). + warnings.simplefilter('default') qt_args = get_qt_args(args) log.init.debug("Qt arguments: {}, based on {}".format(qt_args, args)) super().__init__(get_qt_args(args))