Skip to content

Commit 9037611

Browse files
committed
tidy config parsing
1 parent 1bcc080 commit 9037611

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

config.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,14 @@ def load() -> "Config":
124124
db_provider = Config._init_db_provider(db_type)
125125

126126
# Web URLs
127-
web_sources_raw = get("WEB_SOURCES")
128127
try:
129-
web_sources = json.loads(web_sources_raw)
128+
web_sources = json.loads(get("WEB_SOURCES"))
130129
except json.JSONDecodeError as e:
131130
raise ValueError(f"WEB_SOURCES must be a valid JSON list: {e}")
132131

133132
# Repo sources
134-
repo_sources_json = get("REPO_SOURCES")
135133
try:
136-
repo_sources = json.loads(repo_sources_json)
134+
repo_sources = json.loads(get("REPO_SOURCES"))
137135
except json.JSONDecodeError as e:
138136
raise ValueError(f"Invalid REPO_SOURCES JSON: {e}") from e
139137

0 commit comments

Comments
 (0)