From 2d463e060ef03f08b0c64986dff943d592bd1700 Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Tue, 10 Apr 2012 08:01:27 +0200 Subject: [PATCH] Hide ConversionWarning by default refs #839 --- weboob/tools/application/base.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/weboob/tools/application/base.py b/weboob/tools/application/base.py index 08d0ed9c..2fee83e0 100644 --- a/weboob/tools/application/base.py +++ b/weboob/tools/application/base.py @@ -24,8 +24,9 @@ from optparse import OptionGroup, OptionParser import os import sys import tempfile +import warnings -from weboob.capabilities.base import NotAvailable, NotLoaded +from weboob.capabilities.base import NotAvailable, NotLoaded, ConversionWarning from weboob.core import Weboob, CallErrors from weboob.core.backendscfg import BackendsConfig from weboob.tools.config.iconfig import ConfigError @@ -304,6 +305,10 @@ class BaseApplication(object): else: level = logging.WARNING + # this only matters to developers + if not self.options.debug and not self.options.save_responses: + warnings.simplefilter('ignore', category=ConversionWarning) + handlers = [] if self.options.save_responses: