Don't delete containers when they weren't created.

When swift-bench is run in direct mode, don't try to delete the
containers which weren't created.

Fixes bug 1177960.

Change-Id: Ice07e8729bb776e2b215894cf95fb80b64167a8d
This commit is contained in:
Darrell Bishop 2013-05-08 14:43:56 -07:00
parent 165af3f603
commit a4e6cefa80
1 changed files with 3 additions and 2 deletions

View File

@ -147,7 +147,8 @@ if __name__ == '__main__':
options.del_concurrency = options.concurrency
options.containers = ['%s_%d' % (options.container_name, i)
for i in xrange(int(options.num_containers))]
# check boolean options vs config parameter values
# Normalize boolean option to a config parameter value
if config_true_value(str(options.delete).lower()):
options.delete = 'yes'
else:
@ -181,5 +182,5 @@ if __name__ == '__main__':
controller = controller_class(logger, options)
controller.run()
if config_true_value(options.delete.lower()):
if options.use_proxy and options.delete == 'yes':
delete_containers(logger, options)