pastoob: add a newline for get

Unless we are writing in a file or in a pipe
This commit is contained in:
Laurent Bachelier 2011-04-26 18:55:07 +02:00
commit 4b2b9e511f

View file

@ -62,6 +62,10 @@ class Pastoob(ReplApplication):
return 3
output = sys.stdout
output.write(paste.contents)
# add a newline unless we are writing
# in a file or in a pipe
if os.isatty(output.fileno()):
output.write('\n')
def do_post(self, filename):
"""