Esempio n. 1
0
 def _sync_recv(self, fields):
     for req_id, req_type, data in self.recv_message_wait():
         data = FieldStruct.parse(data, fields)
         error = data.pop("error", self.DEFAULT_ERROR)
         if error.get("code") != 0:
             raise RaleighException(error)
         return data
Esempio n. 2
0
 def _sync_recv(self, fields):
     for req_id, req_type, data in self.recv_message_wait():
         return FieldStruct.parse(data, fields)