[cleanup] stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 29 Mar 2010 13:34:24 +0200
branchstable
changeset 5061 cdab5220eac0
parent 5060 ee3b856e1406
child 5062 5691fd8697cd
[cleanup]
server/sources/native.py
web/views/editcontroller.py
--- a/server/sources/native.py	Mon Mar 29 13:34:06 2010 +0200
+++ b/server/sources/native.py	Mon Mar 29 13:34:24 2010 +0200
@@ -191,6 +191,8 @@
         # sql queries cache
         self._cache = Cache(repo.config['rql-cache-size'])
         self._temp_table_data = {}
+        # we need a lock to protect eid attribution function (XXX, really?
+        # explain)
         self._eid_creation_lock = Lock()
         # (etype, attr) / storage mapping
         self._storages = {}
@@ -680,8 +682,7 @@
             assert isinstance(extid, str), type(extid)
             extid = b64encode(extid)
         attrs = {'type': entity.__regid__, 'eid': entity.eid, 'extid': extid,
-                 'source': uri, 'dtime': datetime.now(),
-                 }
+                 'source': uri, 'dtime': datetime.now()}
         self.doexec(session, self.sqlgen.insert('deleted_entities', attrs), attrs)
 
     def modified_entities(self, session, etypes, mtime):
--- a/web/views/editcontroller.py	Mon Mar 29 13:34:06 2010 +0200
+++ b/web/views/editcontroller.py	Mon Mar 29 13:34:24 2010 +0200
@@ -290,5 +290,3 @@
     def _action_delete(self):
         self.delete_entities(self._cw.edited_eids(withtype=True))
         return self.reset()
-
-