mirror of
https://github.com/python/cpython.git
synced 2025-09-09 18:32:22 +00:00
Consistently raise a TypeError when a non str is passed to hashlib.new
regardless of which of the two implementations of new is used.
This commit is contained in:
parent
00528e8fec
commit
76c28f7ce2
2 changed files with 4 additions and 7 deletions
|
@ -88,7 +88,7 @@ def __get_builtin_constructor(name):
|
|||
except ImportError:
|
||||
pass # no extension module, this hash is unsupported.
|
||||
|
||||
raise ValueError('unsupported hash type %s' % name)
|
||||
raise ValueError('unsupported hash type ' + name)
|
||||
|
||||
|
||||
def __get_openssl_constructor(name):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue