pyuv: adapt to 1.x API changes
This commit is contained in:
parent
36737867b1
commit
3474c0dad5
|
@ -82,12 +82,9 @@ class UvWatcher(object):
|
||||||
with self.lock:
|
with self.lock:
|
||||||
if path not in self.watches:
|
if path not in self.watches:
|
||||||
try:
|
try:
|
||||||
self.watches[path] = pyuv.fs.FSEvent(
|
handle = pyuv.fs.FSEvent(self.loop)
|
||||||
self.loop,
|
self.watches[path] = handle
|
||||||
path,
|
handle.start(path, 0, partial(self._record_event, path))
|
||||||
partial(self._record_event, path),
|
|
||||||
pyuv.fs.UV_CHANGE | pyuv.fs.UV_RENAME
|
|
||||||
)
|
|
||||||
except pyuv.error.FSEventError as e:
|
except pyuv.error.FSEventError as e:
|
||||||
code = e.args[0]
|
code = e.args[0]
|
||||||
if code == pyuv.errno.UV_ENOENT:
|
if code == pyuv.errno.UV_ENOENT:
|
||||||
|
|
Loading…
Reference in New Issue