From ff10b9e862761adfe3523655e3952b685f73ff65 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 28 Dec 2014 23:51:45 +0300 Subject: [PATCH] Fix tests: handle must not be saved to .watches until it was started Otherwise .is_watching() method does not return valid results. --- powerline/lib/watcher/uv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerline/lib/watcher/uv.py b/powerline/lib/watcher/uv.py index ecdcb847..272db0ff 100644 --- a/powerline/lib/watcher/uv.py +++ b/powerline/lib/watcher/uv.py @@ -87,8 +87,8 @@ class UvWatcher(object): def _start_watch_1_x(self, path): handle = pyuv.fs.FSEvent(self.loop) - self.watches[path] = handle handle.start(path, 0, partial(self._record_event, path)) + self.watches[path] = handle def _start_watch_0_x(self, path): self.watches[path] = pyuv.fs.FSEvent(