Skip to content

Commit 7f11c40

Browse files
committed
Convert Sire containers to a list when loading config files. [ci skip]
1 parent 1630f41 commit 7f11c40

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/somd2/io/_io.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,13 @@ def yaml_to_dict(path):
142142
except Exception as e:
143143
raise ValueError(f"Could not load YAML file: {e}")
144144

145+
# Convert Sire containers to lists.
146+
for key, value in d.items():
147+
try:
148+
d[key] = value.to_list()
149+
except:
150+
pass
151+
145152
return d
146153

147154

0 commit comments

Comments
 (0)