Fix dulwich._compat docstring to make pydoctor happy.
Update hooks.py

python2.4 compat for hooks.py

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>