[dataimport] rename .time to .now attribute of meta generator
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 27 Jan 2016 08:35:51 +0100
changeset 11142 45f738a634e5
parent 11140 fabcd1c6dcd1
child 11143 ebb6809659a4
[dataimport] rename .time to .now attribute of meta generator
cubicweb/dataimport/stores.py
--- a/cubicweb/dataimport/stores.py	Fri Jan 29 15:08:34 2016 +0100
+++ b/cubicweb/dataimport/stores.py	Wed Jan 27 08:35:51 2016 +0100
@@ -258,7 +258,7 @@
             source = cnx.repo.system_source
         self.source = source
         self.create_eid = cnx.repo.system_source.create_eid
-        self.time = datetime.utcnow()
+        self._now = datetime.utcnow()
         # attributes/relations shared by all entities of the same type
         self.etype_attrs = []
         self.etype_rels = []
@@ -315,10 +315,10 @@
         return u'%s%s' % (self.baseurl, entity.eid)
 
     def gen_creation_date(self, entity):
-        return self.time
+        return self._now
 
     def gen_modification_date(self, entity):
-        return self.time
+        return self._now
 
     def gen_created_by(self, entity):
         return self._cnx.user.eid