~sircmpwn/sr.ht-dev

core.sr.ht: config: Add /etc/sr.ht/config.ini to paths v1 APPLIED

Thorben Günther: 1
 config: Add /etc/sr.ht/config.ini to paths

 1 files changed, 2 insertions(+), 2 deletions(-)
#1282025 alpine.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/54034/mbox | git am -3
Learn more about email & git

[PATCH core.sr.ht] config: Add /etc/sr.ht/config.ini to paths Export this patch

At the moment all ".ini" files under /etc/sr.ht are loaded - even if
/etc/sr.ht/config.ini exists. To conform with the Go equivalent [1],
only config.ini will be loaded if it exists.

[1]: https://git.sr.ht/~sircmpwn/core-go/commit/3c1346e6bbc37884ca5eb390e22728e4c40e3fa5
---
 srht/config.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srht/config.py b/srht/config.py
index 4504769..8ac0da3 100644
--- a/srht/config.py
+++ b/srht/config.py
@@ -23,8 +23,8 @@ def load_one(path):
def load_config():
    global _config
    _config = ConfigParser()
    # Loads _either_ config.ini _or_ all .ini files in /etc/sr.ht
    paths = ["config.ini", "/etc/sr.ht/*.ini"]
    # Only load from one of these locations
    paths = ["config.ini", "/etc/sr.ht/config.ini", "/etc/sr.ht/*.ini"]
    for path in paths:
        loaded = any(map(lambda p: load_one(p), glob(path)))
        if loaded:

base-commit: 34213d6d50ced0084a832edb461570f0e8586545
--
2.45.2
core.sr.ht/patches/alpine.yml: SUCCESS in 44s

[config: Add /etc/sr.ht/config.ini to paths][0] from [Thorben Günther][1]

[0]: https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/54034
[1]: mailto:admin@xenrox.net

✓ #1282025 SUCCESS core.sr.ht/patches/alpine.yml https://builds.sr.ht/~sircmpwn/job/1282025
Thanks!

to git@git.sr.ht:~sircmpwn/core.sr.ht
  34213d6..23b57d8  master -> master