]> arthur.barton.de Git - bup.git/commitdiff
ftp: don't output trailing line for 'ls'
authorGabriel Filion <lelutin@gmail.com>
Mon, 16 May 2011 04:27:19 +0000 (00:27 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Sun, 29 May 2011 22:59:14 +0000 (18:59 -0400)
'ls' is currently the only 'ftp' subcommand that outputs a trailing
newline before the prompt is re-displayed. This is cause by the use of
"print" to output a string that already contains an ending newline.

For a matter of consistency of output, make 'ls' output without that
extra trailing newline.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
cmd/ftp-cmd.py

index 18fd1b02ff89c9cc78b9ab99fb9202437832c2ea..9e4721ad8861b18a77d03f6e535ed75bfd496c2e 100755 (executable)
@@ -44,7 +44,7 @@ def do_ls(cmd_args):
                     L.append(node_name(name, sub))
         else:
             L.append(node_name(path, n))
-        print columnate(L, '')
+        sys.stdout.write(columnate(L, ''))
 
 
 def write_to_file(inf, outf):