summaryrefslogtreecommitdiff
path: root/nova/hooks.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/hooks.py')
-rw-r--r--nova/hooks.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/nova/hooks.py b/nova/hooks.py
index 3c67bb3aed..735b89338b 100644
--- a/nova/hooks.py
+++ b/nova/hooks.py
@@ -23,22 +23,22 @@ post)
Hook objects are loaded by HookLoaders. Each named hook may invoke multiple
Hooks.
-Example Hook object:
-
-class MyHook(object):
- def pre(self, *args, **kwargs):
- # do stuff before wrapped callable runs
-
- def post(self, rv, *args, **kwargs):
- # do stuff after wrapped callable runs
-
-Example Hook object with function parameters:
-
-class MyHookWithFunction(object):
- def pre(self, f, *args, **kwargs):
- # do stuff with wrapped function info
- def post(self, f, *args, **kwards):
- # do stuff with wrapped function info
+Example Hook object::
+
+ | class MyHook(object):
+ | def pre(self, *args, **kwargs):
+ | # do stuff before wrapped callable runs
+ |
+ | def post(self, rv, *args, **kwargs):
+ | # do stuff after wrapped callable runs
+
+Example Hook object with function parameters::
+
+ | class MyHookWithFunction(object):
+ | def pre(self, f, *args, **kwargs):
+ | # do stuff with wrapped function info
+ | def post(self, f, *args, **kwargs):
+ | # do stuff with wrapped function info
"""