projects
/
rawdog
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7651fe6
)
Make call_hook return a useful value.
author
Adam Sampson
<ats@offog.org>
Tue, 21 Dec 2004 18:48:00 +0000
(18:48 +0000)
committer
Adam Sampson
<ats@offog.org>
Tue, 21 Dec 2004 18:48:00 +0000
(18:48 +0000)
rawdoglib/plugins.py
patch
|
blob
|
history
diff --git
a/rawdoglib/plugins.py
b/rawdoglib/plugins.py
index 0e3d276c56d59244ecb71d2cea49de3cd5695806..eb81c942293887468cae595fadb5e22d07b14a21 100644
(file)
--- a/
rawdoglib/plugins.py
+++ b/
rawdoglib/plugins.py
@@
-56,8
+56,10
@@
def attach_hook(hookname, func):
def call_hook(hookname, *args):
"""Call all the functions attached to a hook with the given
arguments, in the order they were added, stopping if a hook function
- returns False."""
+ returns False. Returns True if any hook function returned False (i.e.
+ returns True if any hook function handled the request)."""
for func in attached.get(hookname, []):
if not func(*args):
- break
+ return True
+ return False