Workaround python 2.7.3 struct module bug when handling bytes()

master
informatic 2014-10-15 18:56:14 +02:00
parent 366538f58c
commit ab58fe48ea
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ class eSSP(object):
def send_unpack(self, format_string, command, args=[], parse_status=True):
resp = self.send(command, args, parse_status)
return struct.unpack(format_string, resp)
return struct.unpack(format_string, str(resp)) # py 2.7.3 struct workaround
def read(self, parse_status=True):
''' Reads, parses and checks a single message from serial.