You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
calculate-overlay/profiles/templates/3.6/2_ac_install_merge/dev-python/pexpect/fix_multiprocessing

21 lines
941 B

# Calculate format=diff
index cace43b..ab2acaf 100644
--- /usr/lib/python2.7/site-packages/pexpect/__init__.py
+++ /usr/lib/python2.7/site-packages/pexpect/__init__.py
@@ -490,10 +490,13 @@ class spawn(object):
# inherit EOF and INTR definitions from controlling process.
try:
from termios import VEOF, VINTR
- fd = sys.__stdin__.fileno()
+ try:
+ fd = sys.__stdin__.fileno()
+ except ValueError:
+ fd = sys.__stdout__.fileno()
self._INTR = ord(termios.tcgetattr(fd)[6][VINTR])
self._EOF = ord(termios.tcgetattr(fd)[6][VEOF])
- except (ImportError, OSError, IOError, termios.error):
+ except (ImportError, OSError, ValueError, IOError, termios.error):
# unless the controlling process is also not a terminal,
# such as cron(1). Fall-back to using CEOF and CINTR.
try: