diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-01-31 02:38:12 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-01-31 02:38:12 +0000 |
commit | 238e9fffcc0211514f95600163c72e0bf13b6771 (patch) | |
tree | 8fa78b25e09b726568b927e1d80538a4e09175f0 /glanceclient/common/utils.py | |
parent | ff7b58860239307a5a1c1d4bea52235e7003fc8b (diff) | |
parent | e5f6dee95d7559fafc0e768366b3ac773ac91a4f (diff) | |
download | python-glanceclient-238e9fffcc0211514f95600163c72e0bf13b6771.tar.gz |
Merge "Using common method 'bool_from_string' from oslo strutils"
Diffstat (limited to 'glanceclient/common/utils.py')
-rw-r--r-- | glanceclient/common/utils.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/glanceclient/common/utils.py b/glanceclient/common/utils.py index c772822..fd284c1 100644 --- a/glanceclient/common/utils.py +++ b/glanceclient/common/utils.py @@ -49,7 +49,7 @@ def schema_args(schema_getter, omit=[]): typemap = { 'string': str, 'integer': int, - 'boolean': string_to_bool, + 'boolean': strutils.bool_from_string, 'array': list } @@ -177,10 +177,6 @@ def is_authentication_required(f): return getattr(f, 'require_authentication', True) -def string_to_bool(arg): - return arg.strip().lower() in ('t', 'true', 'yes', '1') - - def env(*vars, **kwargs): """Search for the first defined of possibly many env vars |