[Python-checkins] distutils2: Fix one bug and one warning found by pyflakes. Will backport to stdlib.

tarek.ziade python-checkins at python.org
Sun Jan 30 10:43:57 CET 2011


tarek.ziade pushed 49443233cf92 to distutils2:

http://hg.python.org/distutils2/rev/49443233cf92
changeset:   939:49443233cf92
user:        ?ric Araujo <merwok at netwok.org>
date:        Mon Nov 01 15:24:07 2010 +0100
summary:
  Fix one bug and one warning found by pyflakes.  Will backport to stdlib.

files:
  distutils2/_backport/shutil.py
  distutils2/_backport/tests/test_shutil.py

diff --git a/distutils2/_backport/shutil.py b/distutils2/_backport/shutil.py
--- a/distutils2/_backport/shutil.py
+++ b/distutils2/_backport/shutil.py
@@ -285,7 +285,7 @@
         else:
             try:
                 os.remove(fullname)
-            except os.error, err:
+            except os.error:
                 onerror(os.remove, fullname, sys.exc_info())
     try:
         os.rmdir(path)
diff --git a/distutils2/_backport/tests/test_shutil.py b/distutils2/_backport/tests/test_shutil.py
--- a/distutils2/_backport/tests/test_shutil.py
+++ b/distutils2/_backport/tests/test_shutil.py
@@ -518,6 +518,7 @@
 
         # check if the compressed tarball was created
         tarball = base_name + '.zip'
+        self.assertTrue(os.path.exists(tarball))
 
 
     def test_make_archive(self):

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


More information about the Python-checkins mailing list