summaryrefslogtreecommitdiffstats
path: root/Lib/pty.py
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-18 20:02:39 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-18 20:02:39 (GMT)
commitad28c7f9dad791567afa0624acfb3ba430851965 (patch)
tree02095e5f567d6be1de31ffd858d21233b51675dd /Lib/pty.py
parenta19195984922ce89e7695c93b3bb45c3e0e6d732 (diff)
downloadcpython-ad28c7f9dad791567afa0624acfb3ba430851965.zip
cpython-ad28c7f9dad791567afa0624acfb3ba430851965.tar.gz
cpython-ad28c7f9dad791567afa0624acfb3ba430851965.tar.bz2
Issue #16706: get rid of os.error
Diffstat (limited to 'Lib/pty.py')
-rw-r--r--Lib/pty.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/pty.py b/Lib/pty.py
index 3b79202..786ce04 100644
--- a/Lib/pty.py
+++ b/Lib/pty.py
@@ -57,17 +57,17 @@ def _open_terminal():
try:
tty_name, master_fd = sgi._getpty(os.O_RDWR, 0o666, 0)
except IOError as msg:
- raise os.error(msg)
+ raise OSError(msg)
return master_fd, tty_name
for x in 'pqrstuvwxyzPQRST':
for y in '0123456789abcdef':
pty_name = '/dev/pty' + x + y
try:
fd = os.open(pty_name, os.O_RDWR)
- except os.error:
+ except OSError:
continue
return (fd, '/dev/tty' + x + y)
- raise os.error('out of pty devices')
+ raise OSError('out of pty devices')
def slave_open(tty_name):
"""slave_open(tty_name) -> slave_fd