[session] update _hook_control docstring
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Fri, 14 Jun 2013 12:10:45 +0200
changeset 9025 768eb9a6a2db
parent 9024 701b19785f1d
child 9026 84c5b01ebb3e
[session] update _hook_control docstring
server/session.py
--- a/server/session.py	Mon May 27 16:43:02 2013 +0200
+++ b/server/session.py	Fri Jun 14 12:10:45 2013 +0200
@@ -99,18 +99,18 @@
 class _hooks_control(object):
     """context manager to control activated hooks categories.
 
-    If mode is session.`HOOKS_DENY_ALL`, given hooks categories will
+    If mode is`HOOKS_DENY_ALL`, given hooks categories will
     be enabled.
 
-    If mode is session.`HOOKS_ALLOW_ALL`, given hooks categories will
+    If mode is `HOOKS_ALLOW_ALL`, given hooks categories will
     be disabled.
 
     .. sourcecode:: python
 
-       with _hooks_control(self.session, self.session.HOOKS_ALLOW_ALL, 'integrity'):
+       with _hooks_control(cnx, HOOKS_ALLOW_ALL, 'integrity'):
            # ... do stuff with all but 'integrity' hooks activated
 
-       with _hooks_control(self.session, self.session.HOOKS_DENY_ALL, 'integrity'):
+       with _hooks_control(cnx, HOOKS_DENY_ALL, 'integrity'):
            # ... do stuff with none but 'integrity' hooks activated
 
     This is an internal api, you should rather use