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:
parent
1daa866949
commit
b8453fb0a8
1 changed files with 2 additions and 2 deletions
|
|
@ -17,9 +17,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import weboob.tools.date as date_utils
|
|
||||||
from weboob.capabilities import UserError
|
from weboob.capabilities import UserError
|
||||||
from datetime import date
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['ResultsCondition', 'ResultsConditionError']
|
__all__ = ['ResultsCondition', 'ResultsConditionError']
|
||||||
|
|
@ -92,6 +90,8 @@ class ResultsCondition(IResultsCondition):
|
||||||
self.condition_str = condition_str
|
self.condition_str = condition_str
|
||||||
|
|
||||||
def is_valid(self, obj):
|
def is_valid(self, obj):
|
||||||
|
import weboob.tools.date as date_utils
|
||||||
|
from datetime import date
|
||||||
d = obj.to_dict()
|
d = obj.to_dict()
|
||||||
# We evaluate all member of a list at each iteration.
|
# We evaluate all member of a list at each iteration.
|
||||||
for _or in self.condition:
|
for _or in self.condition:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue