Commits

Benjamin Peterson  committed 1a059aa

silence callable warning in hmac

  • Participants
  • Parent commits 7ea805d
  • Branches legacy-trunk

Comments (0)

Files changed (1)

             import hashlib
             digestmod = hashlib.md5
 
-        if callable(digestmod):
+        if hasattr(digestmod, '__call__'):
             self.digest_cons = digestmod
         else:
             self.digest_cons = lambda d='': digestmod.new(d)