obspy.core.event.base.QuantityError.__nonzero__

QuantityError.__nonzero__()

Boolean testing for QuantityError.

QuantityError evaluates True if any of the default fields is not None.

>>> err = QuantityError()
>>> bool(err)
False
>>> err.custom_field = "spam"
>>> bool(err)
False
>>> err.uncertainty = 0.05
>>> bool(err)
True
>>> del err.custom_field
>>> bool(err)
True