]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs-shell: catch libcephfs.Error only in onecmd()
authorRishabh Dave <ridave@redhat.com>
Tue, 1 Oct 2019 06:39:39 +0000 (12:09 +0530)
committerRishabh Dave <ridave@redhat.com>
Sat, 2 Nov 2019 08:48:07 +0000 (14:18 +0530)
Instead of catching it in every method.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
src/tools/cephfs/cephfs-shell

index d672f02c5385899fe9554a1a7b21716345f9f570..34d5366a507d55f680ca437a90414eda9946fe93 100755 (executable)
@@ -409,6 +409,10 @@ class CephFSShell(Cmd):
             perror('***\n{}'.format(e))
         except KeyboardInterrupt:
             perror('Command aborted')
+        except libcephfs.Error as e:
+            perror(e.strerror)
+            if shell.debug:
+                traceback.print_exc(file=sys.stdout)
         except Exception as e:
             perror(e)
             traceback.print_exc(file=sys.stdout)