diff options
author | John Dickinson <me@not.mn> | 2012-10-19 13:50:57 -0700 |
---|---|---|
committer | John Dickinson <me@not.mn> | 2012-10-19 13:50:57 -0700 |
commit | b83e27cba03e8cedd1dd98d7faff81ee35552532 (patch) | |
tree | 041194a6e60ba7336a333a184368d574145c3b60 | |
parent | 2562381e1c181438f796ed286fc4f7644379cfb8 (diff) | |
download | swift-bench-b83e27cba03e8cedd1dd98d7faff81ee35552532.tar.gz |
changed TRUE_VALUES references to utils.config_true_value() call
cleaned up pep8 (v1.3.3) in all files this patch touches
Change-Id: I30e8314dfdc23fb70ab83741a548db9905dfccff
-rwxr-xr-x | bin/swift-bench | 6 | ||||
-rw-r--r-- | swift/common/bench.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/bin/swift-bench b/bin/swift-bench index cd4f7c3..b358ce7 100755 --- a/bin/swift-bench +++ b/bin/swift-bench @@ -23,7 +23,7 @@ from optparse import OptionParser from swift.common.bench import (BenchController, DistributedBenchController, create_containers, delete_containers) -from swift.common.utils import readconf, LogAdapter, TRUE_VALUES +from swift.common.utils import readconf, LogAdapter, config_true_value # The defaults should be sufficient to run swift-bench on a SAIO CONF_DEFAULTS = { @@ -138,7 +138,7 @@ if __name__ == '__main__': options.containers = ['%s_%d' % (options.container_name, i) for i in xrange(int(options.num_containers))] # check boolean options vs config parameter values - if str(options.delete).lower() in TRUE_VALUES: + if config_true_value(str(options.delete).lower()): options.delete = 'yes' else: options.delete = 'no' @@ -170,5 +170,5 @@ if __name__ == '__main__': controller = controller_class(logger, options) controller.run() - if options.delete.lower() in TRUE_VALUES: + if config_true_value(options.delete.lower()): delete_containers(logger, options) diff --git a/swift/common/bench.py b/swift/common/bench.py index 24e4a18..4a4b0a0 100644 --- a/swift/common/bench.py +++ b/swift/common/bench.py @@ -28,7 +28,7 @@ import eventlet import eventlet.pools from eventlet.green.httplib import CannotSendRequest -from swift.common.utils import TRUE_VALUES, LogAdapter +from swift.common.utils import config_true_value, LogAdapter import swiftclient as client from swift.common import direct_client from swift.common.http import HTTP_CONFLICT @@ -144,7 +144,7 @@ class Bench(object): self.user = conf.user self.key = conf.key self.auth_url = conf.auth - self.use_proxy = conf.use_proxy.lower() in TRUE_VALUES + self.use_proxy = config_true_value(conf.use_proxy) self.auth_version = conf.auth_version self.logger.info("Auth version: %s" % self.auth_version) if self.use_proxy: @@ -314,7 +314,7 @@ class BenchController(object): self.logger = logger self.conf = conf self.names = [] - self.delete = conf.delete.lower() in TRUE_VALUES + self.delete = config_true_value(conf.delete) self.gets = int(conf.num_gets) self.aborted = False |