From a51277db95321eae90656e1fbc4ef8b11584735f Mon Sep 17 00:00:00 2001 From: Sebastien Martini Date: Sat, 16 Aug 2014 18:49:59 +0200 Subject: Fix ExcludeFilter docstring examples. Closes #81 --- python2/pyinotify.py | 8 ++++---- python3/pyinotify.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/python2/pyinotify.py b/python2/pyinotify.py index c989d47..7733337 100755 --- a/python2/pyinotify.py +++ b/python2/pyinotify.py @@ -1665,11 +1665,11 @@ class ExcludeFilter: def __init__(self, arg_lst): """ Examples: - ef1 = ExcludeFilter(["^/etc/rc.*", "^/etc/hostname"]) + ef1 = ExcludeFilter(["/etc/rc.*", "/etc/hostname"]) ef2 = ExcludeFilter("/my/path/exclude.lst") Where exclude.lst contains: - ^/etc/rc.* - ^/etc/hostname + /etc/rc.* + /etc/hostname Note: it is not possible to exclude a file if its encapsulating directory is itself watched. See this issue for more details @@ -2199,7 +2199,7 @@ class WatchManager: def set_ignore_events(self, nval): self._ignore_events = nval - ignore_events = property(get_ignore_events, set_ignore_events, + ignore_events = property(get_ignore_events, set_ignore_events, "Make watch manager ignoring new events.") diff --git a/python3/pyinotify.py b/python3/pyinotify.py index ead7be0..57c3549 100755 --- a/python3/pyinotify.py +++ b/python3/pyinotify.py @@ -1654,11 +1654,11 @@ class ExcludeFilter: def __init__(self, arg_lst): """ Examples: - ef1 = ExcludeFilter(["^/etc/rc.*", "^/etc/hostname"]) + ef1 = ExcludeFilter(["/etc/rc.*", "/etc/hostname"]) ef2 = ExcludeFilter("/my/path/exclude.lst") Where exclude.lst contains: - ^/etc/rc.* - ^/etc/hostname + /etc/rc.* + /etc/hostname Note: it is not possible to exclude a file if its encapsulating directory is itself watched. See this issue for more details @@ -2180,7 +2180,7 @@ class WatchManager: def set_ignore_events(self, nval): self._ignore_events = nval - ignore_events = property(get_ignore_events, set_ignore_events, + ignore_events = property(get_ignore_events, set_ignore_events, "Make watch manager ignoring new events.") -- cgit v1.2.1