[Python-checkins] cpython (merge 3.4 -> default): (Merge 3.4) Issue #20978: pyflakes: fix undefined names; remove last part of

victor.stinner python-checkins at python.org
Thu Mar 20 08:55:51 CET 2014


http://hg.python.org/cpython/rev/52404c14be07
changeset:   89868:52404c14be07
parent:      89863:2978643766b9
parent:      89867:8de5d0809dd8
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Thu Mar 20 08:51:24 2014 +0100
summary:
  (Merge 3.4) Issue #20978: pyflakes: fix undefined names; remove last part of
OS/2 support in distutils

files:
  Lib/distutils/spawn.py            |  2 --
  Lib/ftplib.py                     |  1 -
  Lib/multiprocessing/connection.py |  2 +-
  Lib/tempfile.py                   |  2 +-
  4 files changed, 2 insertions(+), 5 deletions(-)


diff --git a/Lib/distutils/spawn.py b/Lib/distutils/spawn.py
--- a/Lib/distutils/spawn.py
+++ b/Lib/distutils/spawn.py
@@ -36,8 +36,6 @@
         _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)
diff --git a/Lib/ftplib.py b/Lib/ftplib.py
--- a/Lib/ftplib.py
+++ b/Lib/ftplib.py
@@ -320,7 +320,6 @@
                 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
--- a/Lib/multiprocessing/connection.py
+++ b/Lib/multiprocessing/connection.py
@@ -29,7 +29,7 @@
 
 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
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -72,7 +72,7 @@
     # file doesn't exist.
     def _stat(fn):
         fd = _os.open(fn, _os.O_RDONLY)
-        os.close(fd)
+        _os.close(fd)
 
 def _exists(fn):
     try:

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list