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:
Gregory P. Smith 2012-07-21 21:19:53 -07:00
parent 00528e8fec
commit 76c28f7ce2
2 changed files with 4 additions and 7 deletions

View file

@ -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):