Author: kees Date: 2009-09-30 18:47:34 +0000 (Wed, 30 Sep 2009) New Revision: 12909 Modified: lib/python/debian_support.py Log: adjust hashlib/sha fallback to actually work correctly Modified: lib/python/debian_support.py ==================================================================--- lib/python/debian_support.py 2009-09-30 18:44:07 UTC (rev 12908) +++ lib/python/debian_support.py 2009-09-30 18:47:34 UTC (rev 12909) @@ -22,10 +22,10 @@ import re try: + from hashlib import sha1 +except ImportError: import sha - sha = sha.new -except ImportError: - from hashlib import sha + sha1 = sha.new import apt_pkg apt_pkg.init() @@ -190,7 +190,7 @@ del listReleases def readLinesSHA1(lines): - m = sha() + m = sha1() for l in lines: m.update(l) return m.hexdigest()