]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs-shell: Fix TypeError in poutput() 29156/head
authorVarsha Rao <varao@redhat.com>
Fri, 5 Jul 2019 16:28:58 +0000 (21:58 +0530)
committerNathan Cutler <ncutler@suse.com>
Mon, 22 Jul 2019 09:46:50 +0000 (11:46 +0200)
Fixes: https://tracker.ceph.com/issues/40679
Signed-off-by: Varsha Rao <varao@redhat.com>
(cherry picked from commit 19f7213f12ee42a4d4c059c044e3dbd514559639)

src/tools/cephfs/cephfs-shell

index 05e1fa44773d2fbaf749fc06f6345bd137db069a..4cad546f55ff4d1c38ab95591a584b53f2e3fb4a 100644 (file)
@@ -55,7 +55,7 @@ shell = None
 
 
 def poutput(s, end='\n'):
-    shell.poutput(s, end)
+    shell.poutput(s, end=end)
 
 
 def setup_cephfs(config_file):
@@ -725,12 +725,12 @@ exists.')
                 if dirs:
                     paths.extend(dirs)
                 else:
-                    self.poutput(path, ':\n')
+                    self.poutput(path, end=':\n')
                 items = sorted(items, key=lambda item: item.d_name)
             else:
                 if path != '' and path != cephfs.getcwd().decode(
                         'utf-8') and len(paths) > 1:
-                    self.poutput(path, ':\n')
+                    self.poutput(path, end=':\n')
                 items = sorted(ls(path),
                                key=lambda item: item.d_name)
             if not args.all:
@@ -769,7 +769,7 @@ exists.')
             if not args.long:
                 print_list(values, shutil.get_terminal_size().columns)
                 if path != paths[-1]:
-                    self.poutput('\n')
+                    self.poutput('')
 
     def complete_rmdir(self, text, line, begidx, endidx):
         """