From 71ff794eca7dd57a0b0473530f685069ac9987f0 Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Fri, 2 Aug 2013 20:46:00 -0700 Subject: [PATCH] ceph_argparse.py: add stderr note if nonrequired param is invalid If we run across a user-supplied parameter that doesn't validate against a non-required descriptor, it may be that it's a valid entry for a later descriptor...or it may be that it's supposed to match. We can't really tell. A possible heuristic would be to call it invalid-for-sure if we're at the end of the descriptor list, but that's not very generic. Warn about it and try to drive on anyway. Signed-off-by: Dan Mick Reviewed-by: Sage Weil --- src/pybind/ceph_argparse.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pybind/ceph_argparse.py b/src/pybind/ceph_argparse.py index 0537f3249684c..2a6fe6e4d0237 100644 --- a/src/pybind/ceph_argparse.py +++ b/src/pybind/ceph_argparse.py @@ -845,6 +845,7 @@ def validate(args, signature, partial=False): if not desc.req: # if not required, just push back; it might match # the next arg + print >> sys.stderr, myarg, 'not valid: ', str(e) myargs.insert(0, myarg) break else: -- 2.39.5