"""
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
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')