Skip to content

Commit

Permalink
Merge pull request #21342 from SUSE/wip-argparse-fix-validate_command…
Browse files Browse the repository at this point in the history
…-error

pybind/ceph_argparse: Fix UnboundLocalError if command doesn't validate

Reviewed-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Apr 13, 2018
2 parents d55724e + f8a8b7e commit abce646
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pybind/ceph_argparse.py
Expand Up @@ -1087,7 +1087,7 @@ def validate_command(sigdict, args, verbose=False):

if found:
if not valid_dict:
print("Invalid command:", e, file=sys.stderr)
print("Invalid command:", ex, file=sys.stderr)
print(concise_sig(sig), ': ', cmd['help'], file=sys.stderr)
else:
bestcmds = bestcmds[:10]
Expand Down

0 comments on commit abce646

Please sign in to comment.