From 790bd6dd1322db0eba7635e86cfe3e54f6b04031 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 20 Mar 2014 08:50:33 +0100 Subject: [PATCH 1/2] Issue #20978: Remove last part of OS/2 support in distutils --- Lib/distutils/spawn.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Lib/distutils/spawn.py b/Lib/distutils/spawn.py index d9cf950a9b0..22e87e8fdb9 100644 --- a/Lib/distutils/spawn.py +++ b/Lib/distutils/spawn.py @@ -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) From 69b1e261fc703106b44095796d78ba6aacbbdb63 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 20 Mar 2014 08:50:52 +0100 Subject: [PATCH 2/2] Issue #20978: pyflakes: fix undefined names --- Lib/ftplib.py | 1 - Lib/multiprocessing/connection.py | 2 +- Lib/tempfile.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Lib/ftplib.py b/Lib/ftplib.py index 2cc470258e1..c83be2b3195 100644 --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -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 diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py index 09ec4fc22a3..9b11a695990 100644 --- a/Lib/multiprocessing/connection.py +++ b/Lib/multiprocessing/connection.py @@ -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 diff --git a/Lib/tempfile.py b/Lib/tempfile.py index 05d4cabe606..57e8a829ec0 100644 --- a/Lib/tempfile.py +++ b/Lib/tempfile.py @@ -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: