]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs-shell: don't catch libcephfs.Error unnecessarily 32213/head
authorRishabh Dave <ridave@redhat.com>
Fri, 13 Dec 2019 14:23:24 +0000 (19:53 +0530)
committerRishabh Dave <ridave@redhat.com>
Thu, 9 Jan 2020 11:03:32 +0000 (16:33 +0530)
Signed-off-by: Rishabh Dave <ridave@redhat.com>
src/tools/cephfs/cephfs-shell

index bace4bb4a5eefdaba9d9888a5fb6d9ad6ff24cc4..01141027c260d979d4afc4f96b354b320ae0bdb3 100755 (executable)
@@ -938,11 +938,7 @@ class CephFSShell(Cmd):
         """
         Rename a file or Move a file from source path to the destination
         """
-        try:
-            cephfs.rename(args.src_path, args.dest_path)
-        except libcephfs.Error as e:
-            perror(e)
-            self.exit_code = e.get_error_code()
+        cephfs.rename(args.src_path, args.dest_path)
 
     def complete_cd(self, text, line, begidx, endidx):
         """
@@ -959,13 +955,9 @@ class CephFSShell(Cmd):
         """
         Change working directory
         """
-        try:
-            cephfs.chdir(args.path)
-            self.working_dir = cephfs.getcwd().decode('utf-8')
-            self.set_prompt()
-        except libcephfs.Error as e:
-            perror(e)
-            self.exit_code = e.get_error_code()
+        cephfs.chdir(args.path)
+        self.working_dir = cephfs.getcwd().decode('utf-8')
+        self.set_prompt()
 
     def do_cwd(self, arglist):
         """