Browse Source

Strip any leading null characters from data before trying to parse message

pyserial_fix
Ryan 11 years ago
parent
commit
7b4b8a045d
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      alarmdecoder/decoder.py

+ 2
- 0
alarmdecoder/decoder.py View File

@@ -294,6 +294,8 @@ class AlarmDecoder(object):

:returns: :py:class:`~alarmdecoder.messages.Message`
"""
data = data.lstrip('\0')

if data is None:
raise InvalidMessageError()



Loading…
Cancel
Save