mythmon/wok — Issue #58: 'site.content.gather.post' hook not supplying `pages` variable to attached function [bug]
Author: robatron
Created: 2012-01-17 06:13:53+00:00
State: open

It appears that the `site.content.gather.post` hook is not providing its attached functions with the `pages` variable like it's supposed to according to the [hook documentation][docs].

[docs]: http://wokdocs.robmd.net/docs/hooks/

For example, in [function][func] attached to the [hook][], I'm including a `pages` parameter. When I try to run wok, I get the following error message:

[func]: https://github.com/robatron/robmd.net/blob/title-img-hook/hooks/blog.py#L1
[hook]: https://github.com/robatron/robmd.net/blob/title-img-hook/hooks/__hooks__.py#L6

rob@vinux ~/robmd.net $ ./wok --server
Traceback (most recent call last):
File "/home/rob/wok/scripts/wok", line 4, in
Engine()
File "/home/rob/wok/wok/engine.py", line 103, in __init__
self.load_pages()
File "/home/rob/wok/wok/engine.py", line 242, in load_pages
for pages in self.run_hook('site.content.gather.post'):
File "/home/rob/wok/wok/engine.py", line 167, in run_hook
returns.append(hook(*args))
TypeError: process_title_images() takes exactly 1 argument (0 given)