'The fetch and config many cmds - opens and closes the connection'

def fetchAndConfigMany(self, cmdTypes):

    sock = None
    f = None
    try:
        (sock, f) = self.connect()
        fetch = {}
        config = {}
        for t in cmdTypes:
            fetch[t] = self.fetch(t, sock, f)
            if (t == 'cpu'):
                config[t] = {}
            else:
                config[t] = self.config(t, sock, f)
        return {'fetch': fetch, 'config': config}
    finally:
        try:
            self.disconnect(sock, f)
        except:
            pass
