From d53e171dddd229afb28d0c60e66f00c03c05826b Mon Sep 17 00:00:00 2001 From: Hiran Wijesinghe Date: Thu, 25 Jan 2024 17:15:18 -0500 Subject: [PATCH] handle corner case of json-seq not terminating with `\n`, if ever --- databroker/client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/databroker/client.py b/databroker/client.py index 4692af713..ce17c6c76 100644 --- a/databroker/client.py +++ b/databroker/client.py @@ -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): """