1005
1005
self.addCleanup(self._restoreHooks)
1006
1006
for key, (parent, name) in known_hooks.iter_parent_objects():
1007
1007
factory = known_hooks.get(key)
1008
setattr(parent, name, factory(key[0], key[1]))
1009
1009
# this hook should always be installed