summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTom Scogland <scogland1@llnl.gov>2016-06-17 13:42:27 -0700
committerTom Scogland <scogland1@llnl.gov>2016-06-17 13:42:27 -0700
commit8770f2a0ea14c7145e87bfd08ca7149ae3838127 (patch)
tree7b481e14d839b88f55bf491e4cd25397e509b77c /lib
parent0743ef4d0ba6632992fee3657f0d89200d4e481b (diff)
downloadspack-8770f2a0ea14c7145e87bfd08ca7149ae3838127.tar.gz
spack-8770f2a0ea14c7145e87bfd08ca7149ae3838127.tar.bz2
spack-8770f2a0ea14c7145e87bfd08ca7149ae3838127.tar.xz
spack-8770f2a0ea14c7145e87bfd08ca7149ae3838127.zip
fixing last flake8 issue
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/cmd/list.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/spack/spack/cmd/list.py b/lib/spack/spack/cmd/list.py
index d1c19b45c6..228ab76780 100644
--- a/lib/spack/spack/cmd/list.py
+++ b/lib/spack/spack/cmd/list.py
@@ -52,16 +52,14 @@ def list(parser, args):
# filter if a filter arg was provided
if args.filter:
- filters = []
+ res = []
for f in args.filter:
if '*' not in f and '?' not in f:
- filters.append('*' + f + '*')
+ r = fnmatch.translate('*' + f + '*')
else:
- filters.append(f)
-
- res = [re.compile(fnmatch.translate(f),
- flags=re.I if args.insensitive else 0)
- for f in filters]
+ r = fnmatch.translate(f)
+ rc = re.compile(r, flags=re.I if args.insensitive else 0)
+ res.append(rc)
if args.search_description:
def match(p, f):