mirror of https://github.com/python/cpython
Use md5.new() constructor
This commit is contained in:
parent
343cbd0279
commit
a90a3b471d
|
@ -70,7 +70,7 @@ class File:
|
|||
except os.error:
|
||||
self.lmtime = self.lctime = self.lsum = None
|
||||
else:
|
||||
self.lsum = md5.md5(open(self.file).read()).digest()
|
||||
self.lsum = md5.new(open(self.file).read()).digest()
|
||||
self.lseen = 1
|
||||
|
||||
def getentry(self, line):
|
||||
|
|
|
@ -55,7 +55,7 @@ def printsum(file, out = sys.stdout):
|
|||
return sts
|
||||
|
||||
def printsumfp(fp, file, out = sys.stdout):
|
||||
m = md5.md5()
|
||||
m = md5.new()
|
||||
try:
|
||||
while 1:
|
||||
data = fp.read(bufsize)
|
||||
|
|
Loading…
Reference in New Issue