[GRASS-git] [OSGeo/grass] bc235f: grass.script: KeyValue raise AttributeError when e...
Laurent Courty
noreply at github.com
Fri Jun 13 07:19:26 PDT 2025
Branch: refs/heads/main
Home: https://github.com/OSGeo/grass
Commit: bc235f0bd765d9a11173e5a80c21c8169826caa8
https://github.com/OSGeo/grass/commit/bc235f0bd765d9a11173e5a80c21c8169826caa8
Author: Laurent Courty <lrntct at gmail.com>
Date: 2025-06-13 (Fri, 13 Jun 2025)
Changed paths:
M python/grass/script/tests/utils_test.py
M python/grass/script/utils.py
Log Message:
-----------
grass.script: KeyValue raise AttributeError when expected (#5885)
In order to be able to use deepcopy correctly, KeyValue must raise an AttributeError when accessing (as an attribute) a key that doesn't exist, instead of a KeyError.
* python script: raise AttributeError instead of KeyError in __getattr__. This allows deepcopy of object
* KeyValue: add tests
* split KeyValue test in two
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