]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs-shell: fix cat command
authorMilind Changire <mchangir@redhat.com>
Sat, 13 Apr 2019 06:45:47 +0000 (12:15 +0530)
committerMilind Changire <mchangir@redhat.com>
Sat, 13 Apr 2019 06:45:47 +0000 (12:15 +0530)
Signed-off-by: Milind Changire <mchangir@redhat.com>
src/tools/cephfs/cephfs-shell

index 29aee0d5f9272cf7e98c12b8ccdb28e68edfb38f..0d00bd58984c929cbfaf644eb28573905369f99c 100755 (executable)
@@ -874,8 +874,10 @@ sub-directories, files')
         Print contents of a file
         """
         for file_name in args.file_names:
-            self.poutput(file_name)
-            copy_to_local(file_name, '-')
+            if is_file_exists(file_name):
+                copy_to_local(file_name, '-')
+            else:
+                self.poutput('%s: no such file' % file_name)
 
     umask_parser = argparse.ArgumentParser(description='Set umask value.')
     umask_parser.add_argument(