Skip to content

Commit

Permalink
Added an additional check.
Browse files Browse the repository at this point in the history
  • Loading branch information
keithjjones committed May 17, 2022
1 parent b2c5ffc commit b4913fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zeek2es.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def main(**args):
n = 0

# We do this one last time to get rid of any remaining lines.
if n != 0:
if n != 0 and len(outstring) > 0:
sendbulk(args, outstring, es_index, filename)
else:
# This does everything the TSV version does, but for JSON
Expand Down Expand Up @@ -578,7 +578,7 @@ def main(**args):
n = 0

# We send the last of the data to the ES server, if there is any left.
if n != 0:
if n != 0 and len(outstring) > 0:
sendbulk(args, outstring, es_index, filename)

# This deals with running as a script vs. cython.
Expand Down

0 comments on commit b4913fa

Please sign in to comment.