diff options
author | Sébastien Martini <seb@dbzteam.org> | 2015-06-04 19:18:00 +0200 |
---|---|---|
committer | Sébastien Martini <seb@dbzteam.org> | 2015-06-04 19:18:00 +0200 |
commit | 0f3f8950d12e4a6534320153eed1a90a778da4ae (patch) | |
tree | 996a2c4b61c4bff3cd6bbf94b14aa157466e8383 /python2/pyinotify.py | |
parent | 2d716e5ceef8ade1a60eff0bac30de939afb2b8d (diff) | |
parent | 387e5445468b88f6c97c7af66da5da2833caf34e (diff) | |
download | pyinotify-master.tar.gz |
Sync whitespace / comments between Python 2 and 3 versions
Diffstat (limited to 'python2/pyinotify.py')
-rwxr-xr-x | python2/pyinotify.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/python2/pyinotify.py b/python2/pyinotify.py index 3ccc4c1..d2f0816 100755 --- a/python2/pyinotify.py +++ b/python2/pyinotify.py @@ -122,6 +122,9 @@ class INotifyWrapper: """ @staticmethod def create(): + """ + Factory method instanciating and returning the right wrapper. + """ # First, try to use ctypes. if ctypes: inotify = _CtypesLibcINotifyWrapper() @@ -1113,8 +1116,8 @@ class Notifier: @type default_proc_fun: instance of ProcessEvent @param read_freq: if read_freq == 0, events are read asap, if read_freq is > 0, this thread sleeps - max(0, read_freq - (timeout / 1000)) seconds. But - if timeout is None it may be different because + max(0, read_freq - (timeout / 1000)) seconds. But if + timeout is None it may be different because poll is blocking waiting for something to read. @type read_freq: int @param threshold: File descriptor will be read only if the accumulated @@ -1669,7 +1672,6 @@ class Watch: class ExcludeFilter: """ ExcludeFilter is an exclusion filter. - """ def __init__(self, arg_lst): """ @@ -1734,7 +1736,6 @@ class WatchManagerError(Exception): """ WatchManager Exception. Raised on error encountered on watches operations. - """ def __init__(self, msg, wmd): """ @@ -1860,6 +1861,7 @@ class WatchManager: return wd watch = Watch(wd=wd, path=path, mask=mask, proc_fun=proc_fun, auto_add=auto_add, exclude_filter=exclude_filter) + # wd are _always_ indexed with their original unicode paths in wmd. self._wmd[wd] = watch log.debug('New %s', watch) return wd @@ -1915,10 +1917,9 @@ class WatchManager: the class' constructor. @type exclude_filter: callable object @return: dict of paths associated to watch descriptors. A wd value - is positive if the watch was added sucessfully, - otherwise the value is negative. If the path was invalid - or was already watched it is not included into this returned - dictionary. + is positive if the watch was added sucessfully, otherwise + the value is negative. If the path was invalid or was already + watched it is not included into this returned dictionary. @rtype: dict of {str: int} """ ret_ = {} # return {path: wd, ...} @@ -2212,7 +2213,6 @@ class WatchManager: "Make watch manager ignoring new events.") - class RawOutputFormat: """ Format string representations. |