pyuv: adapt to 1.x API changes

This commit is contained in:
Saúl Ibarra Corretgé 2014-12-12 09:44:31 +01:00
parent 36737867b1
commit 3474c0dad5
1 changed files with 3 additions and 6 deletions

View File

@ -82,12 +82,9 @@ class UvWatcher(object):
with self.lock:
if path not in self.watches:
try:
self.watches[path] = pyuv.fs.FSEvent(
self.loop,
path,
partial(self._record_event, path),
pyuv.fs.UV_CHANGE | pyuv.fs.UV_RENAME
)
handle = pyuv.fs.FSEvent(self.loop)
self.watches[path] = handle
handle.start(path, 0, partial(self._record_event, path))
except pyuv.error.FSEventError as e:
code = e.args[0]
if code == pyuv.errno.UV_ENOENT: