At L315 in the __readPacket() function a check is made that a byte has been received, but the case where it not received is not handled. I believe the code should look like this:
if ( len(receivedFragment) != 0 ):
receivedFragment = self.__stringToByte(receivedFragment)
## print 'Received packet fragment = ' + hex(receivedFragment)
else:
continue
With the current code, if no byte is read an exception with the following message is raise:
The received packet do not begin with a valid header!
At L315 in the __readPacket() function a check is made that a byte has been received, but the case where it not received is not handled. I believe the code should look like this:
With the current code, if no byte is read an exception with the following message is raise:
Happy to raise a PR for this is you like.
regards, Chris