From 817f9f014022c85f4d6a3afd04f9bb2693dbe0b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sun, 29 Mar 2020 12:51:31 +0200 Subject: [PATCH] policy/utils: fix pyinotify cleanup rm_watch() accepts a list, but not arbitrary iterable. Convert `dict_values` to `list`. --- qrexec/policy/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qrexec/policy/utils.py b/qrexec/policy/utils.py index 5da73547..57cc3765 100644 --- a/qrexec/policy/utils.py +++ b/qrexec/policy/utils.py @@ -70,10 +70,11 @@ def initialize_watcher(self): def cleanup(self): for wdd in self.watches: - self.watch_manager.rm_watch(wdd.values()) + self.watch_manager.rm_watch(list(wdd.values())) self.watches = [] - self.notifier.stop() + if self.notifier is not None: + self.notifier.stop() self.notifier = None self.watch_manager = None