diff options
author | martin f. krafft <madduck@madduck.net> | 2008-03-21 19:12:13 +0100 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-03-21 15:07:10 -0400 |
commit | 5184b8abfce9f2e6c899f8f00e0ac3341161a1b2 (patch) | |
tree | ff37324bee9e4aeeba2631c6fd01ddb24ac9c78e | |
parent | e3624de63c799427fbd95fa5bbef9462f95912c6 (diff) | |
download | ikiwiki-5184b8abfce9f2e6c899f8f00e0ac3341161a1b2.tar ikiwiki-5184b8abfce9f2e6c899f8f00e0ac3341161a1b2.tar.gz |
add last parameter to plugin registration
Signed-off-by: martin f. krafft <madduck@madduck.net>
-rw-r--r-- | plugins/proxy.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/proxy.py b/plugins/proxy.py index 9042f389d..36facecc5 100644 --- a/plugins/proxy.py +++ b/plugins/proxy.py @@ -160,10 +160,10 @@ class IkiWikiProcedureProxy(object): self._xmlrpc_handler = _IkiWikiExtPluginXMLRPCHandler(self._debug_fn) self._xmlrpc_handler.register_function(self._importme, name='import') - def hook(self, type, function, name=None): + def hook(self, type, function, name=None, last=False): if name is None: name = function.__name__ - self._hooks.append((type, name)) + self._hooks.append((type, name, last)) def hook_proxy(*args): # curpage = args[0] @@ -182,10 +182,11 @@ class IkiWikiProcedureProxy(object): def _importme(self): self._debug_fn('importing...') - for type, function in self._hooks: + for type, function, last in self._hooks: self._debug_fn('hooking %s into %s chain...' % (function, type)) self._xmlrpc_handler.send_rpc('hook', self._in_fd, self._out_fd, - id=self._id, type=type, call=function) + id=self._id, type=type, call=function, + last=last) return IkiWikiProcedureProxy._IKIWIKI_NIL_SENTINEL def run(self): |