Martin Dobias 4c8b801791 Make sure that bool(obj) is True for QGIS API objects
bool(obj) in Python has the following semantics:
1. if the object has __bool__() method, return its value
2. if the object has __len__() method, return its value
3. return True

So for objects in QGIS API that implement __len__() method, we were getting
unexpected behavior - for example, "if layer: ..." would evaluate as False
in case the layer was empty, while the usual expectation is that any reference
to an object that is not None should evaluate to True.
2018-06-28 11:04:50 +02:00
..
2018-03-12 14:30:53 +11:00
2018-05-30 12:26:36 +02:00
2018-05-14 11:02:28 -04:00