Allura/allura/lib/helpers.py
def convert_bools(conf, prefix=''):
    '''
    For a given dict, automatically convert any true/false string values into bools.
    Only applies to keys starting with the prefix.

    :param dict conf:
    :param str prefix:
    :return: dict
    '''
    def convert_value(val):
        if isinstance(val, basestring):
            if val.strip().lower() == 'true':
                return True
            elif val.strip().lower() == 'false':
                return False
        return val

    return {
        k: (convert_value(v) if k.startswith(prefix) else v)
        for k, v in conf.iteritems()
    }

    For a given dict, automatically convert any true/false string values into bools.
    Only applies to keys starting with the prefix.

    :param dict conf:
    :param str prefix:
    :return: dict
    
For a given dict, automatically convert any true/false string values into bools.
Only applies to keys starting with the prefix.
For a given dict automatically convert any true / false string values into bools . Only applies to keys starting with the prefix .
def convert_bools(conf, prefix=''):
    def convert_value(val):
        if isinstance(val, basestring):
            if val.strip().lower() == 'true':
                return True
            elif val.strip().lower() == 'false':
                return False
        return val
    return {
        k: (convert_value(v) if k.startswith(prefix) else v)
        for k, v in conf.iteritems()
    }
def convert_bools ( conf , prefix = '' ) : def convert_value ( val ) : if isinstance ( val , basestring ) : if val . strip ( ) . lower ( ) == 'true' : return True elif val . strip ( ) . lower ( ) == 'false' : return False return val return { k : ( convert_value ( v ) if k . startswith ( prefix ) else v ) for k , v in conf . iteritems ( ) }
For a given dict, automatically convert any true/false string values into bools.
For a given dict automatically convert any true / false string values into bools .
'''
    For a given dict, automatically convert any true/false string values into bools.
    Only applies to keys starting with the prefix.

    :param dict conf:
    :param str prefix:
    :return: dict
    '''
None
conf
None
prefix
None