From cb7e8c5663860560bc03b27e65e6378ac55eebc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Wed, 7 Mar 2018 11:36:21 +0100 Subject: [PATCH] Make DirectoryMonitor.ignore setter more pythonic --- lib/tfw/components/directory_monitor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/tfw/components/directory_monitor.py b/lib/tfw/components/directory_monitor.py index fd69cbb..1493133 100644 --- a/lib/tfw/components/directory_monitor.py +++ b/lib/tfw/components/directory_monitor.py @@ -52,8 +52,7 @@ class DirectoryMonitor: @ignore.setter def ignore(self, value): - if value >= 0: self.ignore = value - else: self.ignore = 0 + self.ignore = value if value >= 0 else 0 @property def pauser(self):