silence callable warning in hmac

This commit is contained in:
Benjamin Peterson 2008-08-19 19:07:38 +00:00
parent 5bc9f4c09c
commit 4348a25665
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ class HMAC:
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)