def _remoteInvocationMobileCode(self, method, flags, *args):
# special trimmed-down version for mobile code methods (no locking etc)
body=pickle.dumps((self.URI.objectID,method,flags,args),Pyro.config.PYRO_PICKLE_FORMAT)
sock_sendmsg(self.conn.sock, self.createMsg(body), self.timeout)
ver,answer,pflags = self.receiveMsg(self.conn,1)
if answer is None:
raise ProtocolError('incorrect answer received')
answer=pickle.loads(answer)
if isinstance(answer,PyroExceptionCapsule):
if isinstance(answer.excObj,_InternalNoModuleError):
# server couldn't load module, supply it
return self.processMissingModuleError(answer.excObj, method, flags, args)
else:
# we have an encapsulated exception, raise it again.
answer.raiseEx()
return answer
评论列表
文章目录