Skip to content

Commit

Permalink
handle corner case of json-seq not terminating with \n, if ever
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperrealist committed Jan 25, 2024
1 parent 4a654f9 commit d53e171
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions databroker/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ def documents(self, fill=False):
tail = ""
else:
tail += line
if tail:
item = json.loads(tail)
yield (item["name"], _document_types[item["name"]](item["doc"]))

def __getattr__(self, key):
"""
Expand Down

0 comments on commit d53e171

Please sign in to comment.