Change nargs='*' to argparse.REMAINDER for constraint options. (#2798)
This commit is contained in:
parent
a7a77b5b41
commit
f5557b5723
2 changed files with 3 additions and 2 deletions
|
@ -75,7 +75,7 @@ def _specs(self, **kwargs):
|
|||
|
||||
|
||||
_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(
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue