Skip to content

startup: Skip unreadable database search directories - #8070

Open
NIne-WIngEd wants to merge 4 commits into
OSGeo:mainfrom
NIne-WIngEd:fix/startup-unreadable-directories-8027
Open

NIne-WIngEd wants to merge 4 commits into
OSGeo:mainfrom
NIne-WIngEd:fix/startup-unreadable-directories-8027

Conversation

@NIne-WIngEd

Copy link
Copy Markdown

GRASS now skips unreadable directories instead of crashing at startup. The existing search order and fallback stay the same.

Added tests for permission errors and database discovery.

Fixes #8027

Refs OSGeo#8027. No source or test changes.

AI assistance was used for the issue analysis and draft.
@github-actions github-actions Bot added Python Related code is in Python libraries tests Related to Test Suite labels Oct 14, 2026
@NIne-WIngEd NIne-WIngEd changed the title app: Skip unreadable database search directories startup: Skip unreadable database search directories Oct 14, 2026
@NIne-WIngEd

Copy link
Copy Markdown
Author

Hi, just following up on this PR. The checks are passing now. Could you review and merge it if everything looks good? Happy to make any changes needed. Thanks!

@cwhite911 cwhite911 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I've suggested a few minor improvements, but otherwise this looks good to me.

Comment thread python/grass/app/data.py Outdated
Comment thread python/grass/app/tests/grass_app_data_test.py Outdated
Comment thread python/grass/app/tests/grass_app_data_test.py
@NIne-WIngEd

Copy link
Copy Markdown
Author

Thanks for the review! I replaced the nested try/except blocks with contextlib.suppress. The unreadable-directory test now checks only PermissionError. I also changed deny_listing to patch Path.iterdir directly instead of os.scandir and os.listdir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libraries Python Related code is in Python tests Related to Test Suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] macOS: Startup crashes with StopIteration when ~/Documents is not readable (macOS privacy protection)

2 participants