Make DirectoryMonitor.ignore setter more pythonic

This commit is contained in:
Kristóf Tóth 2018-03-07 11:36:21 +01:00
parent e064c34d8f
commit cb7e8c5663

View File

@ -52,8 +52,7 @@ class DirectoryMonitor:
@ignore.setter @ignore.setter
def ignore(self, value): def ignore(self, value):
if value >= 0: self.ignore = value self.ignore = value if value >= 0 else 0
else: self.ignore = 0
@property @property
def pauser(self): def pauser(self):