diff --git a/rosserial_python/src/rosserial_python/SerialClient.py b/rosserial_python/src/rosserial_python/SerialClient.py index 1cd2453b8..27d4d543a 100644 --- a/rosserial_python/src/rosserial_python/SerialClient.py +++ b/rosserial_python/src/rosserial_python/SerialClient.py @@ -168,9 +168,9 @@ def callback(self, req): data_buffer = io.BytesIO() req.serialize(data_buffer) self.response = None - if self.parent.send(self.id, data_buffer.getvalue()) >= 0: - while self.response is None: - pass + self.parent.send(self.id, data_buffer.getvalue()) + while self.response is None: + pass return self.response def handlePacket(self, data): @@ -505,7 +505,7 @@ def run(self): # Read topic id (2 bytes) read_step = 'topic id' topic_id_header = self.tryRead(2) - topic_id, = struct.unpack("