[connection] remove a dead counter
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Tue, 17 Mar 2015 15:21:29 +0100
changeset 11206 6454ee8f2137
parent 11205 b050cf821ee5
child 11207 d7c7423f4ea6
[connection] remove a dead counter Related to #1381328.
cubicweb/server/session.py
--- a/cubicweb/server/session.py	Wed Jul 16 17:34:21 2014 +0200
+++ b/cubicweb/server/session.py	Tue Mar 17 15:21:29 2015 +0100
@@ -116,10 +116,8 @@
             self.changes = self.cnx.enable_hook_categories(*self.categories)
         else:
             self.changes = self.cnx.disable_hook_categories(*self.categories)
-        self.cnx.ctx_count += 1
 
     def __exit__(self, exctype, exc, traceback):
-        self.cnx.ctx_count -= 1
         try:
             if self.categories:
                 if self.mode is HOOKS_DENY_ALL:
@@ -158,10 +156,8 @@
         else:
             self.oldwrite = self.cnx.write_security
             self.cnx.write_security = self.write
-        self.cnx.ctx_count += 1
 
     def __exit__(self, exctype, exc, traceback):
-        self.cnx.ctx_count -= 1
         if self.oldread is not None:
             self.cnx.read_security = self.oldread
         if self.oldwrite is not None:
@@ -259,8 +255,6 @@
         self.connectionid = '%s-%s' % (session.sessionid, uuid4().hex)
         self.session = session
         self.sessionid = session.sessionid
-        #: reentrance handling
-        self.ctx_count = 0
 
         #: server.Repository object
         self.repo = session.repo