git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@323 830e0280-6d2a-0410-9c65-932aecc39d9d
W. Tell authored on 2008/12/31 21:47:01... | ... |
@@ -9,9 +9,9 @@ import re |
9 | 9 |
import string |
10 | 10 |
import random |
11 | 11 |
try: |
12 |
- import hashlib as hash |
|
12 |
+ from hashlib import md5 |
|
13 | 13 |
except ImportError: |
14 |
- import md5 as hash |
|
14 |
+ from md5 import md5 |
|
15 | 15 |
import errno |
16 | 16 |
|
17 | 17 |
from logging import debug, info, warning, error |
... | ... |
@@ -149,7 +149,7 @@ def mktmpfile(prefix = "/tmp/tmpfile-", randchars = 20): |
149 | 149 |
return mktmpsomething(prefix, randchars, createfunc) |
150 | 150 |
|
151 | 151 |
def hash_file_md5(filename): |
152 |
- h = hash.md5() |
|
152 |
+ h = md5() |
|
153 | 153 |
f = open(filename, "rb") |
154 | 154 |
while True: |
155 | 155 |
# Hash 32kB chunks |