Skip to content

Commit 4d44acd

Browse files
authored
Merge pull request #54 from serv-c/exceptions
fix(config): add a dash marker for environment variables
2 parents a5edc27 + 97d07c3 commit 4d44acd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

servc/svc/config/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
}
2222

2323
DOT_MARKER = os.getenv("SERVC_DOT_MARKER", "_DOT_")
24+
DASH_MARKER = os.getenv("SERVC_DASH_MARKER", "_DASH_")
2425

2526

2627
class Config:
@@ -52,7 +53,7 @@ def __init__(self, config_path: str | None = None):
5253
"CONF__FILE",
5354
"CONF__BUS__ROUTEMAP",
5455
):
55-
self.setValue(key.replace("__", "."), value)
56+
self.setValue(key.replace(DASH_MARKER, "-").replace("__", "."), value)
5657

5758
self.setValue("conf.bus.instanceid", self.get("conf.instanceid"))
5859

0 commit comments

Comments
 (0)