Skip to content

Commit

Permalink
Merge pull request #6 from margaret/issue_5
Browse files Browse the repository at this point in the history
Add check that data[0] is not None before trying to parse it
  • Loading branch information
tannewt committed May 16, 2018
2 parents 25c1c83 + 872d639 commit 7a88c30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adafruit_gps.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def _parse_gprmc(self, args):
# Parse the arguments (everything after data type) for NMEA GPRMC
# minimum location fix sentence.
data = args.split(',')
if data is None or len(data) < 11:
if data is None or len(data) < 11 or data[0] is None:
return # Unexpected number of params.
# Parse fix time.
time_utc = int(_parse_float(data[0]))
Expand Down

0 comments on commit 7a88c30

Please sign in to comment.