From: Milind Changire Date: Sat, 13 Apr 2019 05:00:22 +0000 (+0530) Subject: cephfs-shell: fix mv command X-Git-Tag: v15.1.0~2908^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bca5d60a09ad58a7d0becf90257f7ce6dacbcf37;p=ceph-ci.git cephfs-shell: fix mv command Signed-off-by: Milind Changire --- diff --git a/src/tools/cephfs/cephfs-shell b/src/tools/cephfs/cephfs-shell index f8653043d79..b2f039ce6ca 100755 --- a/src/tools/cephfs/cephfs-shell +++ b/src/tools/cephfs/cephfs-shell @@ -796,7 +796,10 @@ sub-directories, files') """ Rename a file or Move a file from source path to the destination """ - cephfs.rename(to_bytes(args.src_path), to_bytes(args.dest_path)) + try: + cephfs.rename(to_bytes(args.src_path), to_bytes(args.dest_path)) + except: + self.poutput("error: need a file name to move to") def complete_cd(self, text, line, begidx, endidx): """