Skip to content

Commit 91204af

Browse files
author
Niko Pasanen
committed
Bugfix: Checksum checking
- Previously checksum checking was always on (regardless of the value of 'check')
1 parent 4527cf4 commit 91204af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pynmea2/nmea.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def parse(line, check=False):
111111
if checksum:
112112
cs1 = int(checksum, 16)
113113
cs2 = NMEASentence.checksum(nmea_str)
114-
if cs1 != cs2:
114+
if cs1 != cs2 and check:
115115
raise ChecksumError(
116116
'checksum does not match: %02X != %02X' % (cs1, cs2), data)
117117
elif check:

0 commit comments

Comments
 (0)