diff options
author | Kees Cook <kees@debian.org> | 2009-09-30 18:47:34 +0000 |
---|---|---|
committer | Kees Cook <kees@debian.org> | 2009-09-30 18:47:34 +0000 |
commit | 4895e392111ffc5ef8c3d2fc9bd9a785e62449f5 (patch) | |
tree | 52dd08fc2d28c9e73f36a52402f911edaafcbb56 /lib/python/debian_support.py | |
parent | ab43b8320850baca908006ffd8bb2057b974f24d (diff) |
adjust hashlib/sha fallback to actually work correctly
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@12909 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'lib/python/debian_support.py')
-rw-r--r-- | lib/python/debian_support.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/python/debian_support.py b/lib/python/debian_support.py index b546464e68..925bb96802 100644 --- a/lib/python/debian_support.py +++ b/lib/python/debian_support.py @@ -22,10 +22,10 @@ import os import re try: - import sha - sha = sha.new + from hashlib import sha1 except ImportError: - from hashlib import sha + import sha + sha1 = sha.new import apt_pkg apt_pkg.init() @@ -190,7 +190,7 @@ def internRelease(name, releases=listReleases()): del listReleases def readLinesSHA1(lines): - m = sha() + m = sha1() for l in lines: m.update(l) return m.hexdigest() |