Merge "Replace md5 module with hashlib module"

This commit is contained in:
Jenkins 2014-12-05 04:02:22 +00:00 committed by Gerrit Code Review
commit 707b83e6bf

View File

@ -53,7 +53,7 @@ from __future__ import print_function
import argparse import argparse
import datetime import datetime
import functools import functools
import md5 import hashlib
import os import os
import pkginfo import pkginfo
import re import re
@ -428,7 +428,7 @@ class Mirror(object):
'.' + tarball) '.' + tarball)
with open(dot_destination_path, 'w') as dest: with open(dot_destination_path, 'w') as dest:
src = open(source_path, 'r').read() src = open(source_path, 'r').read()
md5sum = md5.md5(src).hexdigest() md5sum = hashlib.md5(src).hexdigest()
dest.write(src) dest.write(src)
safe_name = urllib.quote(tarball) safe_name = urllib.quote(tarball)