Skip to content

Commit 602244c

Browse files
committed
Minor fix.
1 parent 84666d6 commit 602244c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stackinator/mirror.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ def _load_mirrors(self, cmdline_cache: Optional[str]) -> Dict[str, Dict]:
5050
# load the raw yaml input
5151
mirrors = yaml.load(fid, Loader=yaml.SafeLoader)
5252
except (OSError, PermissionError) as err:
53-
raise MirrorError("Could not open/read mirrors.yaml file.\n{err}")
53+
raise MirrorError(f"Could not open/read mirrors.yaml file.\n{err}")
5454
else:
5555
mirrors = {}
5656

5757
try:
5858
schema.MirrorsValidator.validate(mirrors)
5959
except ValueError as err:
60-
raise MirrorError("Mirror config does not comply with schema.\n{err}")
60+
raise MirrorError(f"Mirror config does not comply with schema.\n{err}")
6161

6262
# Add or set the cache given on the command line as the buildcache destination
6363
if cmdline_cache is not None:
@@ -84,7 +84,7 @@ def _load_mirrors(self, cmdline_cache: Optional[str]) -> Dict[str, Dict]:
8484
mirrors['legacy_cache_cfg'] = legacy_cache
8585

8686

87-
caches = {name: mirror for name, mirror in mirrors.items() if mirror['cache']]
87+
caches = {name: mirror for name, mirror in mirrors.items() if mirror['cache']}
8888
if len(caches) > 1:
8989
raise MirrorError(
9090
"Mirror config has more than one mirror specified as the build cache destination.\n"

0 commit comments

Comments
 (0)