summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/process.py2
1 files changed, 1 insertions, 1 deletions
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):