summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Kuchling <amk@amk.ca>2013-06-01 17:52:30 (GMT)
committerAndrew Kuchling <amk@amk.ca>2013-06-01 17:52:30 (GMT)
commitedf33c0145c394694bbcb44a2aaedea0816b9b9e (patch)
tree9b36776ed3933d70f37684eaeee728b7e4a5a5b5
parente9ec2e173d6a37d3450d900b42bc5f1584b490d4 (diff)
downloadcpython-edf33c0145c394694bbcb44a2aaedea0816b9b9e.zip
cpython-edf33c0145c394694bbcb44a2aaedea0816b9b9e.tar.gz
cpython-edf33c0145c394694bbcb44a2aaedea0816b9b9e.tar.bz2
#18066: remove vestigial code depending on the sgi module
-rw-r--r--Lib/pty.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/Lib/pty.py b/Lib/pty.py
index 5fe53c1..e841f12 100644
--- a/Lib/pty.py
+++ b/Lib/pty.py
@@ -47,18 +47,7 @@ def master_open():
return _open_terminal()
def _open_terminal():
- """Open pty master and return (master_fd, tty_name).
- SGI and generic BSD version, for when openpty() fails."""
- try:
- import sgi
- except ImportError:
- pass
- else:
- try:
- tty_name, master_fd = sgi._getpty(os.O_RDWR, 0o666, 0)
- except OSError as msg:
- raise OSError(msg)
- return master_fd, tty_name
+ """Open pty master and return (master_fd, tty_name)."""
for x in 'pqrstuvwxyzPQRST':
for y in '0123456789abcdef':
pty_name = '/dev/pty' + x + y