]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
cephfs-shell: make onecmd() print proper error msg
authordparmar18 <dparmar@redhat.com>
Mon, 2 May 2022 11:03:30 +0000 (16:33 +0530)
committerdparmar18 <dparmar@redhat.com>
Mon, 9 May 2022 13:49:39 +0000 (19:19 +0530)
commitc5f3c5122c7d3e23edce8798fcb5a25d4d6f527e
tree48c3f973958a66f08b6cbedbef4f3c1a26652d5d
parentff144995a849407c258bcb763daa3e03cfce5059
cephfs-shell: make onecmd() print proper error msg

Rationale: Whenever a python exception occurred in cephfs-shell,
           it would often only be the exception message but doesn't
           say anything about the type of exception. For example if
           `ZeroDivisionError: division by zero` occurred, the onecmd()
           would print `division by zero` but will omit the type of
           exception. In this case it's easy to understand but let's
           say an `KeyError` exception occurred for a key `9999` which
           is not existent in the dictionary, onecmd() would print
           just `9999` in this scenario and it would be very difficult
           to interpret what type of error it is.

Fixes: https://tracker.ceph.com/issues/55536
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
src/tools/cephfs/cephfs-shell