Replace md5 module with hashlib module
* H237 module md5 is removed in Python 3 Change-Id: I56ea59e0dedd99febc056095ab3e3bf15983f92b
This commit is contained in:
@@ -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
|
||||||
@@ -424,7 +424,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)
|
||||||
|
|||||||
Reference in New Issue
Block a user