Skip to content

Commit 136df8d

Browse files
committed
Simplify multi-file config loading
1 parent b53155d commit 136df8d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/blueapi/config.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -368,15 +368,9 @@ def use_values_from_yaml(self, *paths: Path) -> None:
368368
path (Path): Path to YAML/JSON file
369369
"""
370370

371-
# Split reading and loading so that a missing file does not leave
372-
# config in partially loaded state
373-
configs = []
374371
for path in paths:
375372
with path.open("r") as stream:
376-
configs.append(yaml.load(stream, yaml.Loader))
377-
378-
for values in configs:
379-
self.use_values(values)
373+
self.use_values(yaml.load(stream, yaml.Loader))
380374

381375
def load(self) -> C:
382376
"""

0 commit comments

Comments
 (0)