[aur-dev][PATCH v2] config: allow reading both the defaults file and the modified config
Lukas Fleischer
lfleischer at archlinux.org
Sun Apr 22 07:28:46 UTC 2018
On Sun, 15 Apr 2018 at 16:29:43, Eli Schwartz wrote:
> In the process, rename config.proto to config.defaults (because that is
> what it is now).
>
> Also use dict.get('key', default_value) when querying os.environ, rather
> than an if block, as it is more pythonic/readable/concise, and reduces
> the number of dict lookups.
>
> This change allows aurweb configuration to be done via either:
> - copying config.defaults to config and modifying values
> - creating a new config only containing modified values, next to a
> config.defaults containing unmodified values
> [...]
> INSTALL | 6 ++++--
> TESTING | 2 +-
> aurweb/config.py | 10 ++++++----
> conf/{config.proto => config.defaults} | 0
> web/lib/confparser.inc.php | 12 +++++++++++-
> 5 files changed, 22 insertions(+), 8 deletions(-)
> rename conf/{config.proto => config.defaults} (100%)
> [...]
Great! I wonder whether it would be easy to add tests for this new
feature to our test suite... Merged into pu, thanks!
More information about the aur-dev
mailing list