[GRASS-git] [OSGeo/grass] 45a048: grass.app: Move mapset locking to the library (#4158)
Vaclav Petras
noreply at github.com
Tue Sep 24 20:46:02 PDT 2024
Branch: refs/heads/main
Home: https://github.com/OSGeo/grass
Commit: 45a0486cdbd5d7e930aca16c4a6a6397e7f6d221
https://github.com/OSGeo/grass/commit/45a0486cdbd5d7e930aca16c4a6a6397e7f6d221
Author: Vaclav Petras <wenzeslaus at gmail.com>
Date: 2024-09-24 (Tue, 24 Sep 2024)
Changed paths:
M lib/init/grass.py
M python/grass/app/data.py
Log Message:
-----------
grass.app: Move mapset locking to the library (#4158)
This moves the lock_mapset function to the library. It introduces only small changes to the code, i.e., proper refactoring and de-duplication in relation to the code elsewhere is still needed.
However, this unifies the error handling to always raising a custom exception. It also fixes the reported user using the mapset (before always the current user, now, the owner of the lock file; for that, lock file is removed only after getting its owner). This also removes the debug message which I don't find particularly useful, for example it is currently misleading on Windows and it is relatively easy to confirm the actual existence in process manager when debugging.
Change message wording to add clarity. Fix translatable message are fixed. Uses format function everywhere.
Gets install path (GISBASE) automatically (requires caller to have environment set up which is likely a reasonable requirement at this point).
Fixes order of reporting owner and deleting the file. Cleans up order of paths.
To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications
More information about the grass-commit
mailing list