Skip to content
Snippets Groups Projects
Commit 1c610db4 authored by Nicolas Dumazet's avatar Nicolas Dumazet
Browse files

inotify: repowatcher: don't use a watches attribute to count watches

The encapsulated watcher alread has a __len__ method for this purpose.
Also, repowatcher.watches was never decremented on watch deletions.
parent 9d0c521b
No related branches found
No related tags found
No related merge requests found
......@@ -235,7 +235,6 @@
self.statcache = {}
self.statustrees = dict([(s, {}) for s in self.statuskeys])
self.watches = 0
self.last_event = None
self.lastevent = {}
......@@ -277,7 +276,6 @@
self.ui.note(_('watching %r\n') % path[len(self.wprefix):])
try:
self.watcher.add(path, mask)
self.watches += 1
except OSError, err:
if err.errno in (errno.ENOENT, errno.ENOTDIR):
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment