(Merge 3.4) Issue #20978: pyflakes: fix undefined names; remove last part of

OS/2 support in distutils
This commit is contained in:
Victor Stinner 2014-03-20 08:51:24 +01:00
commit a69f0f94d3
4 changed files with 2 additions and 5 deletions

View File

@ -36,8 +36,6 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0):
_spawn_posix(cmd, search_path, dry_run=dry_run)
elif os.name == 'nt':
_spawn_nt(cmd, search_path, dry_run=dry_run)
elif os.name == 'os2':
_spawn_os2(cmd, search_path, dry_run=dry_run)
else:
raise DistutilsPlatformError(
"don't know how to spawn programs on platform '%s'" % os.name)

View File

@ -320,7 +320,6 @@ class FTP:
raise err
else:
raise OSError("getaddrinfo returns an empty list")
raise OSError(msg)
sock.listen(1)
port = sock.getsockname()[1] # Get proper port
host = self.sock.getsockname()[0] # Get proper host

View File

@ -29,7 +29,7 @@ from .reduction import ForkingPickler
try:
import _winapi
from _winapi import WAIT_OBJECT_0, WAIT_TIMEOUT, INFINITE
from _winapi import WAIT_OBJECT_0, WAIT_ABANDONED_0, WAIT_TIMEOUT, INFINITE
except ImportError:
if sys.platform == 'win32':
raise

View File

@ -72,7 +72,7 @@ else:
# file doesn't exist.
def _stat(fn):
fd = _os.open(fn, _os.O_RDONLY)
os.close(fd)
_os.close(fd)
def _exists(fn):
try: