From 2b5b57b8888c8b29c33e167c8618a75f5673b9c0 Mon Sep 17 00:00:00 2001 From: Ryan Tucker Date: Tue, 16 Mar 2010 11:26:32 -0400 Subject: [PATCH] respect the test mode when wanting to delete the COMPLETE file (oops) --- backup-manager.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/backup-manager.py b/backup-manager.py index 6a41152..b72bd9b 100755 --- a/backup-manager.py +++ b/backup-manager.py @@ -285,8 +285,11 @@ def main(): key.delete() sys.stdout.write('.') if backups[backupnum]['finalkey']: - backups[backupnum]['finalkey'].delete() - sys.stdout.write('!') + if options.test: + sys.stdout.write('X') + else: + backups[backupnum]['finalkey'].delete() + sys.stdout.write('!') sys.stdout.write('\n') elif options.host and options.backupnum: for bucket in buckets: @@ -316,8 +319,11 @@ def main(): key.delete() sys.stdout.write('.') if toast['finalkey']: - toast['finalkey'].delete() - sys.stdout.write('!') + if options.test: + sys.stdout.write('X') + else: + toast['finalkey'].delete() + sys.stdout.write('!') sys.stdout.write('\n') else: parser.error('Host %s not found' % options.host)