Fix TypeError when trying to hash body in python2.4