From 12a99f4a2df3f4bbb3dc85414cd3b7aaa2849a6c Mon Sep 17 00:00:00 2001
From: Patrick Gartung <gartung@fnal.gov>
Date: Thu, 30 Jan 2020 15:17:55 -0600
Subject: Use non-mutable default for names in binary_distribution::get_specs
 call (#14696)

* Use non-mutable default for names

* Make suggested change
---
 lib/spack/spack/binary_distribution.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'lib')

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,
-- 
cgit v1.2.3-70-g09d2