Rename is_watched method to is_watching

This commit is contained in:
ZyX 2014-09-02 21:51:46 +04:00
parent 986a69481f
commit 6484341222
3 changed files with 3 additions and 3 deletions

View File

@ -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:

View File

@ -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

View File

@ -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