From 4b2b9e511f6d4010150f4414c9612a3a9817dd54 Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Tue, 26 Apr 2011 18:55:07 +0200 Subject: [PATCH] pastoob: add a newline for get Unless we are writing in a file or in a pipe --- weboob/applications/pastoob/pastoob.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/weboob/applications/pastoob/pastoob.py b/weboob/applications/pastoob/pastoob.py index 269c4d73..106a6978 100644 --- a/weboob/applications/pastoob/pastoob.py +++ b/weboob/applications/pastoob/pastoob.py @@ -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): """