summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Gartung <gartung@fnal.gov>2020-01-30 15:17:55 -0600
committerGitHub <noreply@github.com>2020-01-30 15:17:55 -0600
commit12a99f4a2df3f4bbb3dc85414cd3b7aaa2849a6c (patch)
tree19a85d918a87997b35ed962002a0fca3cf0dbddf
parentb072caadeced9ed1eda97825d9242849294f7362 (diff)
downloadspack-12a99f4a2df3f4bbb3dc85414cd3b7aaa2849a6c.tar.gz
spack-12a99f4a2df3f4bbb3dc85414cd3b7aaa2849a6c.tar.bz2
spack-12a99f4a2df3f4bbb3dc85414cd3b7aaa2849a6c.tar.xz
spack-12a99f4a2df3f4bbb3dc85414cd3b7aaa2849a6c.zip
Use non-mutable default for names in binary_distribution::get_specs call (#14696)
* Use non-mutable default for names * Make suggested change
-rw-r--r--lib/spack/spack/binary_distribution.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py
index bb5f3d86d0..b898f27f49 100644
--- a/lib/spack/spack/binary_distribution.py
+++ b/lib/spack/spack/binary_distribution.py
@@ -664,7 +664,7 @@ def extract_tarball(spec, filename, allow_root=False, unsigned=False,
_cached_specs = None
-def get_specs(force=False, use_arch=False, names=[]):
+def get_specs(force=False, use_arch=False, names=None):
"""
Get spec.yaml's for build caches available on mirror
"""
@@ -676,6 +676,8 @@ def get_specs(force=False, use_arch=False, names=[]):
if use_arch:
arch_pattern = '(%s-%s-[^-]*)' % (arch.platform, arch.os)
+ if names is None:
+ names = ['']
names_or_hashes = [name.replace('/', '') for name in names]
names_pattern = '|'.join(names_or_hashes)
regex_pattern = '%s(.*)(%s)(.*)(spec.yaml$)' % (arch_pattern,