Skip to content

Commit

Permalink
fix: multi yaml parsing with same keys
Browse files Browse the repository at this point in the history
  • Loading branch information
ejseqera committed Nov 2, 2023
1 parent eeaaecf commit d00aa56
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions seqerakit/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ def parse_all_yaml(file_paths, destroy=False):
for file_path in file_paths:
with open(file_path, "r") as f:
data = yaml.safe_load(f)
# Update merged_data with the content of this file
merged_data.update(data)
for key, value in data.items():
if key in merged_data:
merged_data[key].extend(value)
else:
merged_data[key] = value

# Get the names of all the blocks/resources to create in the merged data.
block_names = list(merged_data.keys())

# Define the order in which the resources should be created.
Expand Down

0 comments on commit d00aa56

Please sign in to comment.