[PATCH] added ORGAS_LIST_URL environment variable
Export this patch
---
fetch.py | 3 ++ -
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fetch.py b/fetch.py
index fb31185..a3c56b9 100644
--- a/fetch.py
+++ b/fetch.py
@@ -2,6 +2,7 @@ from collections import defaultdict
from io import BytesIO
from urllib.request import urlopen
import yaml
+ import os
from platforms import Detector as PlatformDetector
from storage import save_repos, save_orgs, save_libraries
@@ -11,7 +12,7 @@ def fetch_orgs(detector):
organizations = []
resp = urlopen(
- "https://git.sr.ht/~etalab/codegouvfr-sources/blob/test-yaml/comptes-organismes-publics-yaml"
+ os.getenv("ORGAS_LIST_URL") or "https://git.sr.ht/~etalab/codegouvfr-sources/blob/test-yaml/comptes-organismes-publics-yaml"
)
data = resp.read()
--
2.30.0
Applied, thank you very much.
PS: I'll remove the "or" condition when we convert the source file
to .yaml on https://git.sr.ht/~etalab/codegouvfr-sources.