Skip to content

Commit

Permalink
Bugfix: Checksum checking
Browse files Browse the repository at this point in the history
- Previously checksum checking was always on (regardless of the value of 'check')
  • Loading branch information
Niko Pasanen committed Jul 7, 2020
1 parent 4527cf4 commit 91204af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pynmea2/nmea.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def parse(line, check=False):
if checksum:
cs1 = int(checksum, 16)
cs2 = NMEASentence.checksum(nmea_str)
if cs1 != cs2:
if cs1 != cs2 and check:
raise ChecksumError(
'checksum does not match: %02X != %02X' % (cs1, cs2), data)
elif check:
Expand Down

0 comments on commit 91204af

Please sign in to comment.