def invoke_command(self, *args):
        # create a request descriptor
        reqdesc = ReqDesc(self, args, self.token)
        self.pendingops[reqdesc.commandnumber] = reqdesc
        # send the request
        with self.writelock:
            self.conn.send(reqdesc.cm)
        with self.lock:
            try:
                while not reqdesc.replyvalid:
                    reqdesc.replyarrived.wait()
            except __HOLE__:
                self._graceexit()
            del self.pendingops[reqdesc.commandnumber]
        if reqdesc.reply.replycode == CR_OK or reqdesc.reply.replycode == CR_UNBLOCK:
            return reqdesc.reply.reply
        elif reqdesc.reply.replycode == CR_EXCEPTION:
            raise Exception(pickle.loads(reqdesc.reply.reply))
        else:
            print "Unexpected Client Reply Code: %d" % reqdesc.reply.replycode
dataset/ETHPy150Open denizalti/concoord/concoord/blockingclientproxy.py/ClientProxy.invoke_command