fix invalid syntax in printhooks

I can't build a debian package from master at the moment as the printhooks plugin isn't valid python.