]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph.in: Better error on bad arg to 'tell' 1486/head
authorJohn Spray <john.spray@inktank.com>
Mon, 17 Mar 2014 16:17:05 +0000 (16:17 +0000)
committerJohn Spray <john.spray@inktank.com>
Mon, 17 Mar 2014 16:21:24 +0000 (16:21 +0000)
commita9f8a9e45854786af064a37c6358d3cb4cc43f36
tree4bb6b942f3eba1943a1af4811c0d329c1ac72489
parentbf7f773b466c37a67a5de5fbf1ab708c1aea91d6
ceph.in: Better error on bad arg to 'tell'

Previously would get a rather enigmatic error:
  UnboundLocalError: local variable 'ret' referenced before assignment

Now give something sensible:
  ceph_argparse.ArgumentValid: Bad target type 'mds'

Also update a couple of the other catch-all exception handlers
so that they will let the (nicer) ArgumentError exception through
for humans to see instead of munging them into RuntimeErrors.

Signed-off-by: John Spray <john.spray@inktank.com>
src/pybind/ceph_argparse.py