mirror of
https://github.com/powerline/powerline.git
synced 2025-07-31 01:35:40 +02:00
Rename is_watched
method to is_watching
This commit is contained in:
parent
986a69481f
commit
6484341222
@ -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:
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user