mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Get rig of EnvironmentError (#16705)
This commit is contained in:
parent
6eda46de99
commit
3438fa496d
16 changed files with 34 additions and 35 deletions
|
@ -819,7 +819,7 @@ class Popen(object):
|
|||
for f in filter(None, (self.stdin, self.stdout, self.stderr)):
|
||||
try:
|
||||
f.close()
|
||||
except EnvironmentError:
|
||||
except OSError:
|
||||
pass # Ignore EBADF or other errors.
|
||||
|
||||
# Make sure the child pipes are closed as well.
|
||||
|
@ -833,7 +833,7 @@ class Popen(object):
|
|||
for fd in to_close:
|
||||
try:
|
||||
os.close(fd)
|
||||
except EnvironmentError:
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
raise
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue