Skip to content

Commit

Permalink
Skip empty log queries
Browse files Browse the repository at this point in the history
  • Loading branch information
nfelger committed Aug 9, 2022
1 parent ef1b438 commit 0b9d7b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion query_and_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ def query_rows_from_labels(endpoint, config):
)

data = []
for line in logcli_output.decode("utf-8").strip().split("\n"):
for line in logcli_output.decode("utf-8").split("\n"):
if not line:
continue
row = json.loads(line)
timestamp = {timestamp_mapping: row["timestamp"]} if timestamp_mapping else {}
data.append(
Expand Down

0 comments on commit 0b9d7b2

Please sign in to comment.