From ce1a00acce390f466de57919d97af02c00e645a3 Mon Sep 17 00:00:00 2001 From: Florent Date: Wed, 9 Jul 2014 15:53:46 +0200 Subject: [PATCH] Import of FormFieldConversionWarning can not fail anymore The test was here for python3 user, to not import browser1. Since the load of the exception does not need browser1 anymore (see "Remove import of browser1 in BaseApplication"), this check is useless --- weboob/tools/application/base.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/weboob/tools/application/base.py b/weboob/tools/application/base.py index 504bc932..5a0cc164 100644 --- a/weboob/tools/application/base.py +++ b/weboob/tools/application/base.py @@ -31,6 +31,7 @@ from weboob.capabilities.base import ConversionWarning, BaseObject from weboob.core import Weboob, CallErrors from weboob.core.backendscfg import BackendsConfig from weboob.tools.config.iconfig import ConfigError +from weboob.tools.exceptions import FormFieldConversionWarning from weboob.tools.log import createColoredFormatter, getLogger, settings as log_settings from weboob.tools.misc import to_unicode from .results import ResultsConditionError @@ -350,12 +351,7 @@ class BaseApplication(object): # this only matters to developers if not self.options.debug and not self.options.save_responses: warnings.simplefilter('ignore', category=ConversionWarning) - try: - from weboob.tools.exceptions import FormFieldConversionWarning - except ImportError: - pass - else: - warnings.simplefilter('ignore', category=FormFieldConversionWarning) + warnings.simplefilter('ignore', category=FormFieldConversionWarning) handlers = []