diff --git a/src/calliope/attrdict.py b/src/calliope/attrdict.py index 6c84e51d..3e12e402 100644 --- a/src/calliope/attrdict.py +++ b/src/calliope/attrdict.py @@ -359,7 +359,6 @@ def to_yaml(self, path: str | None = None) -> str: yaml_.dump(result, stream) yaml_str = stream.getvalue() if path: - yaml_str = self.to_yaml() with open(path, "w") as f: f.write(yaml_str) return yaml_str