mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Replace IOError with OSError (#16715)
This commit is contained in:
parent
16bdd4120d
commit
f7a17b48d7
121 changed files with 381 additions and 386 deletions
|
@ -56,7 +56,7 @@ def _open_terminal():
|
|||
else:
|
||||
try:
|
||||
tty_name, master_fd = sgi._getpty(os.O_RDWR, 0o666, 0)
|
||||
except IOError as msg:
|
||||
except OSError as msg:
|
||||
raise OSError(msg)
|
||||
return master_fd, tty_name
|
||||
for x in 'pqrstuvwxyzPQRST':
|
||||
|
@ -83,7 +83,7 @@ def slave_open(tty_name):
|
|||
try:
|
||||
ioctl(result, I_PUSH, "ptem")
|
||||
ioctl(result, I_PUSH, "ldterm")
|
||||
except IOError:
|
||||
except OSError:
|
||||
pass
|
||||
return result
|
||||
|
||||
|
@ -173,7 +173,7 @@ def spawn(argv, master_read=_read, stdin_read=_read):
|
|||
restore = 0
|
||||
try:
|
||||
_copy(master_fd, master_read, stdin_read)
|
||||
except (IOError, OSError):
|
||||
except OSError:
|
||||
if restore:
|
||||
tty.tcsetattr(STDIN_FILENO, tty.TCSAFLUSH, mode)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue