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

Add error handling to _fsevents.remove_watch #788

Conversation

CCP-Aporia
Copy link
Contributor

The C extension wasn't great at dealing with some of the edge cases when watches are removed. This manifested itself in a couple of different errors. Some of them were worked around in Python land, most notably with checks for self._watch and setting it to None when it was removed. This masked an issue where we assumed that a watch was always found in the internal lookup dictionary when it was removed. With this issue fixed we can remove those checks, which is also done here.

The C extension wasn't great at dealing with some of the edge cases when watches are removed. This manifested itself in a couple of different errors. Some of them were worked around in Python land, most notably with checks for `self._watch` and setting it to `None` when it was removed. This masked an issue where we assumed that a watch was always found in the internal lookup dictionary when it was removed. With this issue fixed we can remove those checks, which is also done here.
BoboTiG added a commit that referenced this pull request May 7, 2021
@BoboTiG BoboTiG closed this May 10, 2021
@BoboTiG BoboTiG deleted the branch gorakhargosh:fix-fsevent-callback-no-watcher May 10, 2021 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants