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
def _sync_recv(self, fields): for req_id, req_type, data in self.recv_message_wait(): return FieldStruct.parse(data, fields)