From: Zac Medico Date: Thu, 7 Jun 2007 12:17:10 +0000 (-0000) Subject: Fix strange _DevNull instance has no attribute 'isatty' warnings that occur when... X-Git-Tag: v2.2_pre1~1283 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=407c6e13d75246e9bf9646eac0f911cc1c3c0a5c;p=portage.git Fix strange _DevNull instance has no attribute 'isatty' warnings that occur when epydoc generates docs. svn path=/main/trunk/; revision=6748 --- 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):