summaryrefslogtreecommitdiffstats
path: root/Lib/hmac.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-06-30 15:27:56 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-06-30 15:27:56 (GMT)
commit24ef3e967f4698da6c85778408e920f6437ed344 (patch)
treeec35aa2c1aa347abbc4bc4f0ba5ab6e668a8856a /Lib/hmac.py
parent9c7817e9ee0c6d8909a168ba9e12e87d9e7d6caf (diff)
downloadcpython-24ef3e967f4698da6c85778408e920f6437ed344.zip
cpython-24ef3e967f4698da6c85778408e920f6437ed344.tar.gz
cpython-24ef3e967f4698da6c85778408e920f6437ed344.tar.bz2
Issue #15225: improve error message when hmac is passed a wrong key type.
Patch by Marc Abramowitz.
Diffstat (limited to 'Lib/hmac.py')
-rw-r--r--Lib/hmac.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/hmac.py b/Lib/hmac.py
index 9c08023..4297a71 100644
--- a/Lib/hmac.py
+++ b/Lib/hmac.py
@@ -35,7 +35,7 @@ class HMAC:
"""
if not isinstance(key, bytes):
- raise TypeError("expected bytes, but got %r" % type(key).__name__)
+ raise TypeError("key: expected bytes, but got %r" % type(key).__name__)
if digestmod is None:
import hashlib
p;id=e9232d6def5b8f634f37b0bb8bfdec7df59971ba&id2=7bae8de48320044921e87e6c81cbc9bb39ee476a'>root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')