summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Martini <seb@dbzteam.org>2010-05-19 15:25:58 +0200
committerSebastien Martini <seb@dbzteam.org>2010-05-19 15:25:58 +0200
commit722cce1b6b1f953e0a99e6860917e7c0fe93235b (patch)
tree094c8f62a300fd936980fdddad6f03365d88d79c
parentbe91bfbbe7a849952b2fe61a49205d66fb5c850c (diff)
downloadpyinotify-722cce1b6b1f953e0a99e6860917e7c0fe93235b.tar.gz
Reverts previous commit for the following reasons:
- Preserve backward compatibility; - Returning a dictionary with all the iterated directories for which ENOSPC was raised gives the information these directories existed and were iterated and something wrong happened, it is useful information; - It is definitively developer's responsibility to check a given subtree is not too deep or that max_user_watches is not large enough before calling add_watch(). This reverts commit be91bfbbe7a849952b2fe61a49205d66fb5c850c.
-rwxr-xr-xpython2/pyinotify.py7
-rwxr-xr-xpython3/pyinotify.py5
2 files changed, 0 insertions, 12 deletions
diff --git a/python2/pyinotify.py b/python2/pyinotify.py
index 6f24a3f..3ff0f05 100755
--- a/python2/pyinotify.py
+++ b/python2/pyinotify.py
@@ -1646,8 +1646,6 @@ class WatchManager:
If |path| si already watched it is ignored, but if it is called with
option rec=True a watch is put on each one of its not-watched
subdirectory.
- This method returns immediately on first ENOSPC error encountered
- (see http://trac.dbzteam.org/pyinotify/wiki/FrequentlyAskedQuestions).
@param path: Path to watch, the path can either be a file or a
directory. Also accepts a sequence (list) of paths.
@@ -1709,11 +1707,6 @@ class WatchManager:
err = err % (rpath, wd, STRERRNO())
if quiet:
log.error(err)
- if (sys.version_info[0] >= 2 and
- sys.version_info[1] >= 6 and
- errno.ENOSPC == ctypes.get_errno()):
- # In this case return immediately
- return ret_
else:
raise WatchManagerError(err, ret_)
else:
diff --git a/python3/pyinotify.py b/python3/pyinotify.py
index c3b7626..c3de72a 100755
--- a/python3/pyinotify.py
+++ b/python3/pyinotify.py
@@ -1593,8 +1593,6 @@ class WatchManager:
If |path| is already watched it is ignored, but if it is called with
option rec=True a watch is put on each one of its not-watched
subdirectory.
- This method returns immediately on first ENOSPC error encountered
- (see http://trac.dbzteam.org/pyinotify/wiki/FrequentlyAskedQuestions).
@param path: Path to watch, the path can either be a file or a
directory. Also accepts a sequence (list) of paths.
@@ -1660,9 +1658,6 @@ class WatchManager:
err = err % (rpath, wd, STRERRNO())
if quiet:
log.error(err)
- if errno.ENOSPC == ctypes.get_errno():
- # In this case return immediately
- return ret_
else:
raise WatchManagerError(err, ret_)
else: