Uh oh!
There was an error while loading. Please reload this page.
skip directories with perm error when building autoimport index - #733
Conversation
MrBago
commented
Dec 1, 2023
I ran into this minor issue when working on my other PR so here's a quick patch. |
tkrabel-db
commented
Dec 6, 2023
@MrBago thanks for that! LGTM. |
Uh oh!
There was an error while loading. Please reload this page.
| with tempfile.TemporaryDirectory() as dir: | ||
| import os | ||
| os.chmod(dir, 0) | ||
| sys.path.append(dir) |
There was a problem hiding this comment.
This test lacks isolation, changing the sys.path here is global mutation that won't be undone by the end of the test so it will affect other tests as well.
There was a problem hiding this comment.
@MrBago I think it's enough to remove the dir at the end of the context manager.
There was a problem hiding this comment.
@lieryan I updated the test to use prefs.python_paths instead of sys.path.
Uh oh!
There was an error while loading. Please reload this page.
lieryan
left a comment
There was a problem hiding this comment.
Tests shouldn't be changing the sys.path globally
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
MrBago
commented
Jan 2, 2024
@lieryan Happy new year! When you have a min, can you look the update I made to this PR? |
- comment is not a docstring - use octal syntax for chmod
lieryan
commented
Jan 3, 2024
Thanks for fixing this issue @MrBago |
lieryan
commented
Jan 3, 2024
@all-contributors add @MrBago for code contribution |
I've put up a pull request to add @MrBago! 🎉 |
Description
WIth this fix, rope will skip folders in sys.path that the user does not have permission to access instead of failing the entire cache build.
Fixes #(issue)
Checklist (delete if not relevant):