'Connect to the Munin node'

def connect(self):

    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.connect((self.host, self.port))
    f = sock.makefile()
    if (not f):
        try:
            sock.close()
        except:
            pass
        raise Exception('Error    reading    data    from    socket')
    banner = f.readline()
    if (len(banner) == 0):
        raise Exception('Unable    to    connect    to    Munin')
    return (sock, f)
