From 90f3408e564e6f153511e6aaedebc98e44049ef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=A4hne?= Date: Tue, 14 Apr 2009 14:36:26 +0000 Subject: Issue 2377: Check if isatty() exists before calling it --- src/engine/SCons/Script/Main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index c70708d..fb9cbe5 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -885,9 +885,9 @@ def _main(parser): # module will no longer work. This affects the behavior during # --interactive mode. --interactive should only be used when stdin and # stdout refer to a tty. - if not sys.stdout.isatty(): + if not hasattr(sys.stdout, 'isatty') or not sys.stdout.isatty(): sys.stdout = SCons.Util.Unbuffered(sys.stdout) - if not sys.stderr.isatty(): + if not hasattr(sys.stderr, 'isatty') or not sys.stderr.isatty(): sys.stderr = SCons.Util.Unbuffered(sys.stderr) memory_stats.append('before reading SConscript files:') -- cgit v0.12