From c0f420bf7d7659ee110432f7cbb0233554dfd32a Mon Sep 17 00:00:00 2001 From: Eli Collins Date: Thu, 12 Apr 2012 21:52:26 -0400 Subject: assorted bugfixes, tweaks, and tests added; based on coverage examination * test os_crypt backend has functional fallback * test handler methods accept all unicode/bytes combinations for secret & hash * fixed some incorrect error messages & types being caught & raised * other minor cleanups --- passlib/utils/md4.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'passlib/utils/md4.py') diff --git a/passlib/utils/md4.py b/passlib/utils/md4.py index cd3d012..4389a09 100644 --- a/passlib/utils/md4.py +++ b/passlib/utils/md4.py @@ -242,14 +242,14 @@ def _has_native_md4(): try: h = hashlib.new("md4") except ValueError: - #not supported + # not supported - ssl probably missing (e.g. ironpython) return False result = h.hexdigest() if result == '31d6cfe0d16ae931b73c59d7e0c089c0': return True if PYPY and result == '': - #as of 1.5, pypy md4 just returns null! - #since this is expected, don't bother w/ warning. + # as of pypy 1.5-1.7, this returns empty string! + # since this is expected, don't bother w/ warning. return False #anything else should alert user from passlib.exc import PasslibRuntimeWarning -- cgit v1.2.1