diff --git a/powerline/lib/vcs/__init__.py b/powerline/lib/vcs/__init__.py index 9d8f60a0..96dee683 100644 --- a/powerline/lib/vcs/__init__.py +++ b/powerline/lib/vcs/__init__.py @@ -53,7 +53,7 @@ def get_branch_name(directory, config_file, get_func, create_watcher): with branch_lock: # Check if the repo directory was moved/deleted fw = branch_watcher(create_watcher) - is_watched = fw.is_watched(directory) + is_watched = fw.is_watching(directory) try: changed = fw(directory) except OSError as e: diff --git a/powerline/lib/watcher/inotify.py b/powerline/lib/watcher/inotify.py index ea7edea4..6708b21e 100644 --- a/powerline/lib/watcher/inotify.py +++ b/powerline/lib/watcher/inotify.py @@ -101,7 +101,7 @@ class INotifyFileWatcher(INotify): self.watches[path] = wd self.modified[path] = False - def is_watched(self, path): + def is_watching(self, path): with self.lock: return realpath(path) in self.watches diff --git a/powerline/lib/watcher/stat.py b/powerline/lib/watcher/stat.py index 3ac70c74..0c089716 100644 --- a/powerline/lib/watcher/stat.py +++ b/powerline/lib/watcher/stat.py @@ -23,7 +23,7 @@ class StatFileWatcher(object): with self.lock: self.watches.pop(path, None) - def is_watched(self, path): + def is_watching(self, path): with self.lock: return realpath(path) in self.watches