From: Milind Changire Date: Sat, 13 Apr 2019 05:04:06 +0000 (+0530) Subject: cephfs-shell: fix chdir command X-Git-Tag: v15.1.0~2908^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2dad1b96a0aa97ed8acc45f71dc65c57734fcc1f;p=ceph.git cephfs-shell: fix chdir command Signed-off-by: Milind Changire --- diff --git a/src/tools/cephfs/cephfs-shell b/src/tools/cephfs/cephfs-shell index b2f039ce6ca..49635b2b433 100755 --- a/src/tools/cephfs/cephfs-shell +++ b/src/tools/cephfs/cephfs-shell @@ -825,7 +825,10 @@ sub-directories, files') else: cephfs.chdir(b'/') else: - cephfs.chdir(to_bytes(args.dir_name)) + try: + cephfs.chdir(to_bytes(args.dir_name)) + except: + self.poutput("%s: no such directory" % args.dir_name) self.working_dir = cephfs.getcwd().decode('utf-8') self.set_prompt()