This fixes a small issue in python 3.x. On line 293 of pyes.ES.__del__, the magicmethod for bool in Python 3 wasn't defined, so the "if self.bulker" check always passes, so every time a pyes.ES object is garbage collected a message is logged at error level and a useless flush_bulk(True) is called. I think this is what's behind issue 458.
I also fixed the 2 other places that defined __nonzero__ but not __bool__ while I was at it.
This fixes a small issue in python 3.x. On line 293 of
pyes.ES.__del__
, the magicmethod for bool in Python 3 wasn't defined, so the "if self.bulker" check always passes, so every time a pyes.ES object is garbage collected a message is logged at error level and a useless flush_bulk(True) is called. I think this is what's behind issue 458.I also fixed the 2 other places that defined
__nonzero__
but not__bool__
while I was at it.