[added] __nonzero__ method for boolean tests on FilterOptions object

This commit is contained in:
Sebastian Wehling-Benatelli 2015-10-30 06:11:15 +01:00
parent 94448297bb
commit 43f9e6fe0d

View File

@ -206,6 +206,9 @@ class FilterOptions(object):
order=self.getOrder()) order=self.getOrder())
return hrs return hrs
def __nonzero__(self):
return bool(self.getFilterType())
def parseFilterOptions(self): def parseFilterOptions(self):
if self.getFilterType(): if self.getFilterType():
robject = {'type': self.getFilterType(), 'corners': self.getOrder()} robject = {'type': self.getFilterType(), 'corners': self.getOrder()}