Remove obsolete code: now IOError and WindowsError are aliases for OSError
This commit is contained in:
parent
527e725732
commit
df485ca493
@ -396,8 +396,6 @@ if mswindows:
|
|||||||
hStdOutput = None
|
hStdOutput = None
|
||||||
hStdError = None
|
hStdError = None
|
||||||
wShowWindow = 0
|
wShowWindow = 0
|
||||||
class pywintypes:
|
|
||||||
error = IOError
|
|
||||||
else:
|
else:
|
||||||
import select
|
import select
|
||||||
_has_poll = hasattr(select, 'poll')
|
_has_poll = hasattr(select, 'poll')
|
||||||
@ -1102,12 +1100,6 @@ class Popen(object):
|
|||||||
env,
|
env,
|
||||||
cwd,
|
cwd,
|
||||||
startupinfo)
|
startupinfo)
|
||||||
except pywintypes.error as e:
|
|
||||||
# Translate pywintypes.error to WindowsError, which is
|
|
||||||
# a subclass of OSError. FIXME: We should really
|
|
||||||
# translate errno using _sys_errlist (or similar), but
|
|
||||||
# how can this be done from Python?
|
|
||||||
raise WindowsError(*e.args)
|
|
||||||
finally:
|
finally:
|
||||||
# Child is launched. Close the parent's copy of those pipe
|
# Child is launched. Close the parent's copy of those pipe
|
||||||
# handles that only the child should have open. You need
|
# handles that only the child should have open. You need
|
||||||
|
Loading…
x
Reference in New Issue
Block a user