Skip to content

Commit

Permalink
Merge pull request #39 from GlobalFishingWatch/fix-update-tagblock
Browse files Browse the repository at this point in the history
Remove extra newlines from cli commands add-tablock and update-tagblock
  • Loading branch information
pwoods25443 authored Jan 16, 2023
2 parents d48e21e + 0847dc9 commit 7d0a606
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ais_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Tools for managing AIS messages
"""

__version__ = 'v0.1.5.dev3'
__version__ = 'v0.1.5.dev4'
__author__ = 'Paul Woods'
__email__ = '[email protected]'
__source__ = 'https://github.com/GlobalFishingWatch/ais-tools'
Expand Down
4 changes: 2 additions & 2 deletions ais_tools/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def cloud_stream(input, url, source, overwrite):
def add_tagblock(input, output, station):
for nmea in input:
t = tagblock.create_tagblock(station)
output.write(tagblock.add_tagblock(t, nmea))
output.write(tagblock.add_tagblock(t, nmea.strip()))
output.write('\n')


Expand Down Expand Up @@ -101,7 +101,7 @@ def update_tagblock(input, output, station, text):
fields = {'tagblock_station': station, 'tagblock_text': text}
fields = {k: v for k, v in fields.items() if v is not None}
for nmea in input:
output.write(tagblock.update_tagblock(nmea, **fields))
output.write(tagblock.update_tagblock(nmea.strip(), **fields))
output.write('\n')


Expand Down

0 comments on commit 7d0a606

Please sign in to comment.