# HG changeset patch # User Pierre-Yves David # Date 1371204645 -7200 # Node ID 768eb9a6a2dbc43c9750043bbc796ad6429d93e1 # Parent 701b19785f1dea5e79b6e2231d986fb8e4c999ad [session] update _hook_control docstring diff -r 701b19785f1d -r 768eb9a6a2db 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