]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephfs-shell: fix rm command
authorMilind Changire <mchangir@redhat.com>
Sat, 13 Apr 2019 06:40:42 +0000 (12:10 +0530)
committerMilind Changire <mchangir@redhat.com>
Sat, 13 Apr 2019 06:51:38 +0000 (12:21 +0530)
Signed-off-by: Milind Changire <mchangir@redhat.com>
src/tools/cephfs/cephfs-shell

index ef1cb3bfa8557e116326b206fe2af771eb9feaad..fd9122f3e54aca0abb72b02393da1ec12dba3362 100755 (executable)
@@ -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):
         """