Clean up some conf parsing
Change-Id: Idba39e06e3db8eca84f3cef8c597ad222cf6d532
This commit is contained in:
parent
5dac34716b
commit
418ae6f13a
|
@ -144,6 +144,7 @@ if __name__ == '__main__':
|
|||
conf = CONF_DEFAULTS
|
||||
parser.set_defaults(**conf)
|
||||
options, _junk = parser.parse_args()
|
||||
|
||||
if options.concurrency is not '':
|
||||
options.put_concurrency = options.concurrency
|
||||
options.get_concurrency = options.concurrency
|
||||
|
@ -151,11 +152,9 @@ if __name__ == '__main__':
|
|||
options.containers = ['%s_%d' % (options.container_name, i)
|
||||
for i in xrange(int(options.num_containers))]
|
||||
|
||||
# Normalize boolean option to a config parameter value
|
||||
if config_true_value(str(options.delete).lower()):
|
||||
options.delete = 'yes'
|
||||
else:
|
||||
options.delete = 'no'
|
||||
# Turn "yes"/"no"/etc. strings to booleans
|
||||
options.use_proxy = config_true_value(options.use_proxy)
|
||||
options.delete = config_true_value(options.delete)
|
||||
|
||||
def sigterm(signum, frame):
|
||||
sys.exit('Termination signal received.')
|
||||
|
@ -184,5 +183,5 @@ if __name__ == '__main__':
|
|||
controller = controller_class(logger, options)
|
||||
controller.run()
|
||||
|
||||
if options.use_proxy and options.delete == 'yes':
|
||||
if options.use_proxy and options.delete:
|
||||
delete_containers(logger, options)
|
||||
|
|
Loading…
Reference in New Issue