From: Rishabh Dave Date: Tue, 1 Oct 2019 07:01:53 +0000 (+0530) Subject: cephfs-shell: print traceback only when debug switch is on X-Git-Tag: v15.1.0~953^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=54561e0a8a9c922ee000f08eff90d8616e55126a;p=ceph.git cephfs-shell: print traceback only when debug switch is on Signed-off-by: Rishabh Dave --- diff --git a/src/tools/cephfs/cephfs-shell b/src/tools/cephfs/cephfs-shell index 34d5366a507d5..537b61656a1fe 100755 --- a/src/tools/cephfs/cephfs-shell +++ b/src/tools/cephfs/cephfs-shell @@ -415,7 +415,8 @@ class CephFSShell(Cmd): traceback.print_exc(file=sys.stdout) except Exception as e: perror(e) - traceback.print_exc(file=sys.stdout) + if shell.debug: + traceback.print_exc(file=sys.stdout) class path_to_bytes(argparse.Action): def __call__(self, parser, namespace, values, option_string=None):