diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-09-24 21:48:07 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-09-24 21:48:07 +0000 |
commit | 81c69aafecb4d63054b45a3eac86642f9ee6040c (patch) | |
tree | b9b20ee1de2f305ffadef22396d6e74bf92a0e80 | |
parent | 6fcb016e256b67e8371a52a54998500b00404fd4 (diff) | |
download | portage-81c69aafecb4d63054b45a3eac86642f9ee6040c.tar.gz portage-81c69aafecb4d63054b45a3eac86642f9ee6040c.tar.bz2 portage-81c69aafecb4d63054b45a3eac86642f9ee6040c.zip |
Make _test_pty_eof() return None if openpty() fails.
svn path=/main/trunk/; revision=14414
-rw-r--r-- | pym/portage/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index e04e37a82..159515776 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -3743,6 +3743,8 @@ def _test_pty_eof(): """ Returns True if this issues is fixed for the currently running version of python: http://bugs.python.org/issue5380 + Returns None if openpty fails, and False if the above issue + is not fixed. """ import array, pty, termios @@ -3753,7 +3755,9 @@ def _test_pty_eof(): try: master_fd, slave_fd = pty.openpty() except EnvironmentError: - return False + global _disable_openpty + _disable_openpty = True + return None master_file = os.fdopen(master_fd, 'rb') slave_file = os.fdopen(slave_fd, 'wb') |