~alecu/ubuntuone-client/use-standard-reactor

« back to all changes in this revision

Viewing changes to ubuntuone/platform/windows/filesystem_notifications.py

  • Committer: Alejandro J. Cura
  • Date: 2011-06-30 19:20:39 UTC
  • mfrom: (1031.1.4 ubuntuone-client)
  • Revision ID: alecu@canonical.com-20110630192039-i5haubbwvnpw08if
merged trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
            self._subdirs.append(path)
172
172
        return is_dir
173
173
 
 
174
    def _is_excluded(self, event):
 
175
        """Return if an event is ignored."""
 
176
        return (self.exclude_filter and self.exclude_filter(event)) or\
 
177
            event.mask == IN_OPEN | IN_ISDIR
 
178
 
 
179
 
174
180
    def _process_events(self):
175
181
        """Process the events form the queue."""
176
182
        # we transform the events to be the same as the one in pyinotify
221
227
            # the exclude filter returns False, that is, the event will not
222
228
            # be excluded
223
229
            self.log.debug('Event is %s.', event)
224
 
            if not self.exclude_filter or not self.exclude_filter(event):
 
230
            if not self._is_excluded(event):
225
231
                self.log.debug('Addding event %s to queue.', event)
226
232
                self.events_queue.put(event)
227
233