We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de671af commit 6a542e9Copy full SHA for 6a542e9
server/recceiver/processors.py
@@ -22,15 +22,15 @@
22
]
23
24
25
-def _env_vars():
26
- prefix = "RECCEIVER_"
+def _env_vars(section: str) -> dict[str, str]:
+ prefix = "RECCEIVER_" + section.upper() + "_"
27
return {k.removeprefix(prefix).lower(): v for k, v in os.environ.items() if k.startswith(prefix)}
28
29
30
class ConfigAdapter(object):
31
def __init__(self, conf, section):
32
self._C, self._S = conf, section
33
- self.env_vars = _env_vars()
+ self.env_vars = _env_vars(section)
34
35
def __len__(self):
36
return len(self._C.items(self._S, raw=True))
0 commit comments