os.isatty is now forbidden (as stream.fileno() is not implemented by StringIO)

Use stream.isatty() instead.
This commit is contained in:
Romain Bignon 2014-10-07 09:37:41 +02:00
commit 5bd70c564f
5 changed files with 9 additions and 8 deletions

View file

@ -105,7 +105,7 @@ class Pastoob(ReplApplication):
output.write(paste.contents)
# add a newline unless we are writing
# in a file or in a pipe
if os.isatty(output.fileno()):
if output.isatty():
output.write('\n')
def do_post(self, line):

View file

@ -197,5 +197,5 @@ class WebContentEdit(ReplApplication):
# add a newline unless we are writing
# in a file or in a pipe
if os.isatty(output.fileno()):
if output.isatty():
output.write('\n')