From b8453fb0a81dd3f27e6c8d81ea433654c9c89e44 Mon Sep 17 00:00:00 2001 From: Florent Date: Wed, 9 Jul 2014 11:43:48 +0200 Subject: [PATCH] Do not import Date in results header Actually, the condition are not widely used. Do not load the datetime module if we don't run it. --- weboob/tools/application/results.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weboob/tools/application/results.py b/weboob/tools/application/results.py index 6cbaf0e367..afdaeaa7af 100644 --- a/weboob/tools/application/results.py +++ b/weboob/tools/application/results.py @@ -17,9 +17,7 @@ # You should have received a copy of the GNU Affero General Public License # along with weboob. If not, see . -import weboob.tools.date as date_utils from weboob.capabilities import UserError -from datetime import date __all__ = ['ResultsCondition', 'ResultsConditionError'] @@ -92,6 +90,8 @@ def __init__(self, condition_str): self.condition_str = condition_str def is_valid(self, obj): + import weboob.tools.date as date_utils + from datetime import date d = obj.to_dict() # We evaluate all member of a list at each iteration. for _or in self.condition: -- GitLab