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.
This commit is contained in:
Florent 2014-07-09 11:43:48 +02:00
commit b8453fb0a8

View file

@ -17,9 +17,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
import weboob.tools.date as date_utils
from weboob.capabilities import UserError
from datetime import date
__all__ = ['ResultsCondition', 'ResultsConditionError']
@ -92,6 +90,8 @@ class ResultsCondition(IResultsCondition):
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: