pastoob: add a newline for get
Unless we are writing in a file or in a pipe
This commit is contained in:
parent
61c1aef493
commit
4b2b9e511f
1 changed files with 4 additions and 0 deletions
|
|
@ -62,6 +62,10 @@ class Pastoob(ReplApplication):
|
||||||
return 3
|
return 3
|
||||||
output = sys.stdout
|
output = sys.stdout
|
||||||
output.write(paste.contents)
|
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):
|
def do_post(self, filename):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue