This PR fixes a bug in which the ep_hec search command gets called without any events in its' generator.
I did not find a valid solution to check if the generator is empty before trying to connect to the HEC. Stuff like len(list(events)) or sum(1 for _ in events) does not work.
This PR fixes a bug in which the ep_hec search command gets called without any events in its' generator.
I did not find a valid solution to check if the generator is empty before trying to connect to the HEC. Stuff like
len(list(events))
orsum(1 for _ in events)
does not work.