From 407c6e13d75246e9bf9646eac0f911cc1c3c0a5c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 7 Jun 2007 12:17:10 +0000 Subject: [PATCH] Fix strange _DevNull instance has no attribute 'isatty' warnings that occur when epydoc generates docs. svn path=/main/trunk/; revision=6748 --- pym/portage/process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/portage/process.py b/pym/portage/process.py index 0cb175375..c3f5d4df4 100644 --- a/pym/portage/process.py +++ b/pym/portage/process.py @@ -112,7 +112,7 @@ def cleanup(): atexit_register(cleanup) # Make sure the original terminal attributes are reverted at exit. -if sys.stdin.isatty(): +if hasattr(sys.stdin, "isatty") and sys.stdin.isatty(): import termios _stdin_termios = termios.tcgetattr(sys.stdin.fileno()) def _reset_stdin_termios(stdin_termios): -- 2.26.2