diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2017-01-10 12:25:41 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-10 12:25:41 -0800 |
commit | f5557b572366c420f9f7e63c8a7fd6888cf1d88d (patch) | |
tree | 27a894dbb2f437c2f83b20a5c6898a917bfcd6bd | |
parent | a7a77b5b412df774af5862b540df05ee1a2215c0 (diff) | |
download | spack-f5557b572366c420f9f7e63c8a7fd6888cf1d88d.tar.gz spack-f5557b572366c420f9f7e63c8a7fd6888cf1d88d.tar.bz2 spack-f5557b572366c420f9f7e63c8a7fd6888cf1d88d.tar.xz spack-f5557b572366c420f9f7e63c8a7fd6888cf1d88d.zip |
Change nargs='*' to argparse.REMAINDER for constraint options. (#2798)
-rw-r--r-- | lib/spack/spack/cmd/common/arguments.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/cmd/find.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/spack/spack/cmd/common/arguments.py b/lib/spack/spack/cmd/common/arguments.py index 53e75a4f2c..f091b9cf75 100644 --- a/lib/spack/spack/cmd/common/arguments.py +++ b/lib/spack/spack/cmd/common/arguments.py @@ -75,7 +75,7 @@ class ConstraintAction(argparse.Action): _arguments['constraint'] = Args( - 'constraint', nargs='*', action=ConstraintAction, + 'constraint', nargs=argparse.REMAINDER, action=ConstraintAction, help='Constraint to select a subset of installed packages') _arguments['module_type'] = Args( diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index ab0b29c30e..ecd6ae2822 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -117,7 +117,8 @@ def find(parser, args): # Exit early if no package matches the constraint if not query_specs and args.constraint: - msg = "No package matches the query: {0}".format(args.constraint) + msg = "No package matches the query: {0}".format( + ' '.join(args.constraint)) tty.msg(msg) return |