From 6fe4d6b8dad23a0e7d13310d1be191d4c80cd2cf Mon Sep 17 00:00:00 2001 From: pankrat Date: Tue, 14 Apr 2009 14:36:26 +0000 Subject: [PATCH] Issue 2377: Check if isatty() exists before calling it git-svn-id: http://scons.tigris.org/svn/scons/trunk@4091 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- 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 c70708d9..fb9cbe52 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:') -- 2.26.2