

def __format_value(key, value, ds_attributes):
    type_ = ds_attributes[key]['type']
    if (type_ == 'BOOLEAN'):
        if (type_ in ('true', 'false')):
            return value
        elif isinstance(value, bool):
            if value:
                return 'true'
            else:
                return 'false'
        else:
            raise Exception("Don't know how to convert {0} to BOOLEAN type".format(value))
    elif (type_ == 'INT'):
        return str(value)
    elif (type_ == 'STRING'):
        return '"{0}"'.format(value)
    else:
        raise Exception("Don't know how to format value {0} of type {1}".format(value, type_))

dataset/ETHPy150Open saltstack/salt/salt/modules/jboss7.py __format_value/VarMisuse@35/48 `value`->`type_`