lib: Fix config loading of secrets from files (#887)

This commit is contained in:
Tom Pansino 2021-05-16 12:10:31 -07:00 committed by GitHub
parent d0d3072c50
commit 8d2a3b67b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -88,10 +88,10 @@ class ConfigLoader:
value = os.getenv(url.netloc, url.query) value = os.getenv(url.netloc, url.query)
if url.scheme == "file": if url.scheme == "file":
try: try:
with open(url.netloc, "r") as _file: with open(url.path, "r") as _file:
value = _file.read() value = _file.read()
except OSError: except OSError:
self._log("error", f"Failed to read config value from {url.netloc}") self._log("error", f"Failed to read config value from {url.path}")
value = url.query value = url.query
return value return value