def get_nodes():
    """ Returns all nodes in a list of dicts format
    """
    cfg_file = "/etc/nago/nago.ini"
    config = ConfigParser.ConfigParser()
    config.read(cfg_file)
    result = {}
    for section in config.sections():
        if section in ['main']:
            continue
        token = section
        node = Node(token)
        for key, value in config.items(token):
            node[key] = value
        result[token] = node
    return result
def get_nodes ( ) : cfg_file = "/etc/nago/nago.ini" config = ConfigParser . ConfigParser ( ) config . read ( cfg_file ) result = { } for section in config . sections ( ) : if section in [ 'main' ] : continue token = section node = Node ( token ) for key , value in config . items ( token ) : node [ key ] = value result [ token ] = node return result
Returns all nodes in a list of dicts format