diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-03-30 19:48:34 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-03-30 19:48:34 +0000 |
commit | 21db1bf83670f284b8f3d1dab4dc2be548ffb57e (patch) | |
tree | d9e1211568090e94725766e597f4087bdcb00ef3 /swiftclient/utils.py | |
parent | e3b7ecd2bbc5120444b3c1643fb89ccd47e454bb (diff) | |
parent | 12f86fdcc57896bac62d36c74a80fd19adeeac58 (diff) | |
download | python-swiftclient-21db1bf83670f284b8f3d1dab4dc2be548ffb57e.tar.gz |
Merge "Python 3: Get compatible types from six"
Diffstat (limited to 'swiftclient/utils.py')
-rw-r--r-- | swiftclient/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/swiftclient/utils.py b/swiftclient/utils.py index 5095f9d..058181d 100644 --- a/swiftclient/utils.py +++ b/swiftclient/utils.py @@ -14,6 +14,8 @@ # limitations under the License. """Miscellaneous utility functions for use with Swift.""" +import six + TRUE_VALUES = set(('true', '1', 'yes', 'on', 't', 'y')) @@ -24,7 +26,7 @@ def config_true_value(value): This function come from swift.common.utils.config_true_value() """ return value is True or \ - (isinstance(value, basestring) and value.lower() in TRUE_VALUES) + (isinstance(value, six.string_types) and value.lower() in TRUE_VALUES) def prt_bytes(bytes, human_flag): |