Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Config: Make CoreConfig a singleton object
This prevents the configuration from being read and modified in two different places (`CoreConfig` objects are created in `datastore.py`, `treefactory.py`, and `backends/__init__.py`). * GTG/core/config.py (CoreConfig_): Rename from `CoreConfig`. (CoreConfig_.INSTANCE): New field (use it to store the unique config instance). (CoreConfig_.__init__): Make sure that we are only ever initialized once. (CoreConfig_.get_instance): New method. (CoreConfig): New function to initialize and return the singleton config object.
- Loading branch information