diff options
author | Dan McGee <dan@archlinux.org> | 2009-02-24 03:40:00 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2009-02-24 03:40:00 +0100 |
commit | 9d661240fe77127fbede95066f38f12cad598e2d (patch) | |
tree | 0275d2a02d036f66113ec24adbcf5282e1d80ad3 /pactest | |
parent | f57f8d33862050acc8d131710c100ba47877e675 (diff) | |
download | pacman-9d661240fe77127fbede95066f38f12cad598e2d.tar.gz pacman-9d661240fe77127fbede95066f38f12cad598e2d.tar.xz |
Update pactest to use hashlib
The md5 module is deprecated in favor of hashlib.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'pactest')
-rwxr-xr-x | pactest/util.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pactest/util.py b/pactest/util.py index db9560fe..da6d44e3 100755 --- a/pactest/util.py +++ b/pactest/util.py @@ -18,7 +18,7 @@ import sys import os -import md5 +import hashlib import stat @@ -198,7 +198,7 @@ def getmd5sum(filename): print "file %s does not exist!" % filename return "" fd = open(filename, "rb") - checksum = md5.new() + checksum = hashlib.md5() while 1: block = fd.read(1048576) if not block: @@ -211,7 +211,7 @@ def getmd5sum(filename): def mkmd5sum(data): """ """ - checksum = md5.new() + checksum = hashlib.md5() checksum.update("%s\n" % data) digest = checksum.digest() return "%02x"*len(digest) % tuple(map(ord, digest)) |