FilterPyinotify: fixed sporadic test-case error (multi-threaded) - 'NoneType' object has no attribute 'stop'.

pull/2022/head
sebres 7 years ago
parent 9a38d5697f
commit 9d5f20aab2

@ -374,8 +374,11 @@ class FilterPyinotify(FileFilter):
def stop(self): def stop(self):
# stop filter thread: # stop filter thread:
super(FilterPyinotify, self).stop() super(FilterPyinotify, self).stop()
try:
if self.__notifier: # stop the notifier if self.__notifier: # stop the notifier
self.__notifier.stop() self.__notifier.stop()
except AttributeError: # pragma: no cover
if self.__notifier: raise
## ##
# Wait for exit with cleanup. # Wait for exit with cleanup.

Loading…
Cancel
Save