if os.path.exists(outfilename):
b = git.ShaBloom(outfilename, readwrite=True)
if not b.valid():
+ debug1("bloom: Existing invalid bloom found, regenerating.\n")
b = None
add = []
msg = b is None and 'creating from' or 'adding'
log('bloom: %s %d files (%d objects).\n' % (msg, len(add), add_count))
- tempname = None
+ tfname = None
if b is None:
tfname = os.path.join(path, 'bup.tmp.bloom')
tf = open(tfname, 'w+')
count += 1
log('Writing bloom: %d/%d, done.\n' % (count, len(add)))
- if tempname:
- os.rename(tempname, outfilename)
+ if tfname:
+ os.rename(tfname, outfilename)
handle_ctrl_c()