Mercurial > hg
changeset 8295:1ea7e7d90007
util: remove warnings when importing md5 and sha
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Mon, 04 May 2009 20:29:05 +0200 |
parents | 48a382c23226 |
children | 908c5906091b |
files | mercurial/util.py |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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)