Merge "Using common method 'bool_from_string' from oslo strutils"
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user