respect the test mode when wanting to delete the COMPLETE file (oops)

This commit is contained in:
Ryan Tucker 2010-03-16 11:26:32 -04:00
parent 7b14ba9488
commit 2b5b57b888

View file

@ -285,8 +285,11 @@ def main():
key.delete() key.delete()
sys.stdout.write('.') sys.stdout.write('.')
if backups[backupnum]['finalkey']: if backups[backupnum]['finalkey']:
backups[backupnum]['finalkey'].delete() if options.test:
sys.stdout.write('!') sys.stdout.write('X')
else:
backups[backupnum]['finalkey'].delete()
sys.stdout.write('!')
sys.stdout.write('\n') sys.stdout.write('\n')
elif options.host and options.backupnum: elif options.host and options.backupnum:
for bucket in buckets: for bucket in buckets:
@ -316,8 +319,11 @@ def main():
key.delete() key.delete()
sys.stdout.write('.') sys.stdout.write('.')
if toast['finalkey']: if toast['finalkey']:
toast['finalkey'].delete() if options.test:
sys.stdout.write('!') sys.stdout.write('X')
else:
toast['finalkey'].delete()
sys.stdout.write('!')
sys.stdout.write('\n') sys.stdout.write('\n')
else: else:
parser.error('Host %s not found' % options.host) parser.error('Host %s not found' % options.host)