# HG changeset patch # User Sune Foldager # Date 1241461745 -7200 # Node ID 1ea7e7d900075fc3a8ab8a3e8c03d279a82f12a4 # Parent 48a382c23226736ee2023a23ff17fe8a51b500fa util: remove warnings when importing md5 and sha diff -r 48a382c23226 -r 1ea7e7d90007 mercurial/util.py --- a/mercurial/util.py Mon May 04 15:31:57 2009 +0200 +++ b/mercurial/util.py Mon May 04 20:29:05 2009 +0200 @@ -25,8 +25,7 @@ import hashlib _md5 = hashlib.md5 except ImportError: - import md5 - _md5 = md5.md5 + from md5 import md5 as _md5 global md5 md5 = _md5 return _md5(s) @@ -36,8 +35,7 @@ import hashlib _sha1 = hashlib.sha1 except ImportError: - import sha - _sha1 = sha.sha + from sha import sha as _sha1 global sha1 sha1 = _sha1 return _sha1(s)