diff options
Diffstat (limited to 'python3')
-rwxr-xr-x | python3/pyinotify.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python3/pyinotify.py b/python3/pyinotify.py index 858ab42..fcc1e79 100755 --- a/python3/pyinotify.py +++ b/python3/pyinotify.py @@ -1519,6 +1519,9 @@ class Watch: Represent a watch, i.e. a file or directory being watched. """ + __slots__ = ('wd', 'path', 'mask', 'proc_fun', 'auto_add', + 'exclude_filter', 'dir') + def __init__(self, wd, path, mask, proc_fun, auto_add, exclude_filter): """ Initializations. @@ -1555,7 +1558,7 @@ class Watch: output_format.punctuation('='), output_format.field_value(getattr(self, attr))) \ - for attr in self.__dict__ if not attr.startswith('_')]) + for attr in self.__slots__ if not attr.startswith('_')]) s = '%s%s %s %s' % (output_format.punctuation('<'), output_format.class_name(self.__class__.__name__), |