Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mac] Fix callback exceptions when the watcher is deleted but still receiving events #786

Merged
merged 6 commits into from
May 10, 2021

Commits on May 6, 2021

  1. [mac] Fix callback exceptions when the watcher is deleted but still r…

    …eceiving events
    
    The watcher might be cleared on thread stop but the C callback would still send events.
    Let's ignore them to prevent unhandled exceptions later:
    
        AttributeError: 'NoneType' object has no attribute 'is_recursive'
          File "watchdog/observers/fsevents.py", line 299, in callback
            emitter.queue_events(emitter.timeout, events)
          File "watchdog/observers/fsevents.py", line 261, in queue_events
            self._queue_created_event(event, src_path, src_dirname)
          File "watchdog/observers/fsevents.py", line 124, in _queue_created_event
            self.queue_event(DirModifiedEvent(dirname))
          File "watchdog/observers/fsevents.py", line 97, in queue_event
            if self._watch.is_recursive :
    
    Or even:
    
        AttributeError: 'NoneType' object has no attribute 'path'
          File "watchdog/observers/fsevents.py", line 299, in callback
            emitter.queue_events(emitter.timeout, events)
          File "watchdog/observers/fsevents.py", line 174, in queue_events
            src_path = self._encode_path(event.path)
          File "watchdog/observers/fsevents.py", line 323, in _encode_path
            if isinstance(self.watch.path, bytes):
    
    Co-authored-by: Romain Grasland <rgrasland@nuxeo.com>
    BoboTiG and Romain Grasland committed May 6, 2021
    Configuration menu
    Copy the full SHA
    57f3a1a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6dde6ed View commit details
    Browse the repository at this point in the history

Commits on May 7, 2021

  1. Patch from #788

    BoboTiG committed May 7, 2021
    Configuration menu
    Copy the full SHA
    8c4629c View commit details
    Browse the repository at this point in the history
  2. Revert some changes

    BoboTiG committed May 7, 2021
    Configuration menu
    Copy the full SHA
    3007b17 View commit details
    Browse the repository at this point in the history
  3. Ad the good contrinutor

    Co-authored-by: Thomas <thomas@ccpgames.com>
    BoboTiG and CCP-Aporia committed May 7, 2021
    Configuration menu
    Copy the full SHA
    b2539a1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3e73f56 View commit details
    Browse the repository at this point in the history