Add __bool__() / __nonzero__() method to python rpmmi objects (ticket #153)
- Objects supporting __len__() use (len > 0) for boolean representation,
which normally makes sense but as the match iterator count is often
zero despite the iterator actually existing and returning something,
and breaks existing code (rpmlint at least)
- Adding a __bool__() (known as __nonzero__() in Python < 3) method
returning true for non-NULL iterator fixes this and gives more
meaningful answers than pre 4.8.0 which simply always returned True
(cherry picked from commit
40f788a7bf3741f9c613ff302d4e1b0ceec2658c)