From 4348a25665b2f09f76a605bab507b4edacc4dd24 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 19 Aug 2008 19:07:38 +0000 Subject: [PATCH] silence callable warning in hmac --- Lib/hmac.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/hmac.py b/Lib/hmac.py index 729ef38ce7..538810630c 100644 --- a/Lib/hmac.py +++ b/Lib/hmac.py @@ -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) -- 2.49.0