New global function: add_hook: add a hook in the current context directly associated to the current module
This commit is contained in:
parent
1b5b5af60b
commit
bbfd34fe7b
6 changed files with 28 additions and 27 deletions
|
|
@ -151,6 +151,7 @@ class ModuleLoader(SourceLoader):
|
|||
module.print = lambda msg: print("[%s] %s"%(module.name, msg))
|
||||
module.print_debug = lambda msg: mod_print_dbg(module, msg)
|
||||
module.send_response = lambda srv, res: mod_send_response(self.context, srv, res)
|
||||
module.add_hook = lambda store, hook: self.context.hooks.add_hook(store, hook, module)
|
||||
|
||||
if not hasattr(module, "NODATA"):
|
||||
module.DATAS = xmlparser.parse_file(self.context.datas_path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue