-import os, errno, zlib, time, sha, subprocess, struct, stat, re, tempfile
+import os, errno, zlib, time, subprocess, struct, stat, re, tempfile
import heapq
from bup.helpers import *
def calc_hash(type, content):
header = '%s %d\0' % (type, len(content))
- sum = sha.sha(header)
+ sum = Sha1(header)
sum.update(content)
return sum.digest()
# calculate the pack sha1sum
f.seek(0)
- sum = sha.sha()
+ sum = Sha1()
while 1:
b = f.read(65536)
sum.update(b)