]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs-shell: fix rm command
authorMilind Changire <mchangir@redhat.com>
Sat, 13 Apr 2019 06:40:42 +0000 (12:10 +0530)
committerNathan Cutler <ncutler@suse.com>
Thu, 18 Apr 2019 11:03:09 +0000 (13:03 +0200)
Signed-off-by: Milind Changire <mchangir@redhat.com>
(cherry picked from commit 3840d51452246bb7d8b98327c98ef8bf18c1cb92)

src/tools/cephfs/cephfs-shell

index ef1cb3bfa8557e116326b206fe2af771eb9feaad..fd9122f3e54aca0abb72b02393da1ec12dba3362 100644 (file)
@@ -778,7 +778,10 @@ sub-directories, files')
                 files.extend([i for i in get_all_possible_paths(
                     file_path) if is_file_exists(i)])
             else:
-                cephfs.unlink(to_bytes(file_path))
+                try:
+                    cephfs.unlink(to_bytes(file_path))
+                except:
+                    self.poutput('%s: no such file' % file_path)
 
     def complete_mv(self, text, line, begidx, endidx):
         """