Skip to content

Commit 59901c3

Browse files
committed
ensure yaml matches dict order
1 parent 7f6b560 commit 59901c3

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

stackinator/mirror.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def __init__(
4343

4444
def _load_mirrors(self, cmdline_cache: Optional[pathlib.Path]) -> Dict[str, Dict]:
4545
"""Load the mirrors file, if one exists."""
46+
4647
path = self._system_config_root / "mirrors.yaml"
4748
if path.exists():
4849
try:
@@ -188,7 +189,7 @@ def _create_spack_mirrors_yaml(self, dest: pathlib.Path):
188189
}
189190

190191
with dest.open("w") as file:
191-
yaml.dump(raw, file, default_flow_style=False)
192+
yaml.dump(raw, file, default_flow_style=False, sort_keys=False)
192193

193194
def _create_bootstrap_configs(self, config_root: pathlib.Path):
194195
"""Create the bootstrap.yaml and bootstrap metadata dirs in our build dir."""

stackinator/recipe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import jinja2
66
import yaml
77

8-
from . import cache, root_logger, schema, spack_util, mirror
8+
from . import root_logger, schema, spack_util, mirror
99
from .etc.envvars import EnvVarSet
1010

1111

0 commit comments

Comments
 (0)