[Python-checkins] r65865 - python/trunk/Lib/hmac.py

benjamin.peterson python-checkins at python.org
Tue Aug 19 21:07:39 CEST 2008


Author: benjamin.peterson
Date: Tue Aug 19 21:07:38 2008
New Revision: 65865

Log:
silence callable warning in hmac

Modified:
   python/trunk/Lib/hmac.py

Modified: python/trunk/Lib/hmac.py
==============================================================================
--- python/trunk/Lib/hmac.py	(original)
+++ python/trunk/Lib/hmac.py	Tue Aug 19 21:07:38 2008
@@ -41,7 +41,7 @@
             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)


More information about the Python-checkins mailing list