summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-05-08 22:27:58 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-05-08 22:27:58 (GMT)
commit699adb9cd8efe80c99fb7d2815286aa026d83b91 (patch)
treea560ce03234802ef11d373ea3b78ac11a7f23a4b /Lib/distutils
parentcf7d175ec44be1703839b83bf420501ada5f8fb7 (diff)
downloadcpython-699adb9cd8efe80c99fb7d2815286aa026d83b91.zip
cpython-699adb9cd8efe80c99fb7d2815286aa026d83b91.tar.gz
cpython-699adb9cd8efe80c99fb7d2815286aa026d83b91.tar.bz2
Merged revisions 62873,62887,62892-62896,62904 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r62873 | raymond.hettinger | 2008-05-08 12:18:13 -0500 (Thu, 08 May 2008) | 1 line Issue 2778. Document the temporary frozenset swap in __contains__(), remove(), and discard(). ........ r62887 | brett.cannon | 2008-05-08 14:50:51 -0500 (Thu, 08 May 2008) | 5 lines Make test.test_support.catch_warning() take an argument specifying if any triggered warnings should be captured. This allows the context manager to be used to just prevent the internal state of the 'warnings' framework and thus allow triggered warnings to be displayed. ........ r62892 | brett.cannon | 2008-05-08 15:20:24 -0500 (Thu, 08 May 2008) | 4 lines Fix a bug introduced by the addition of the 'record' argument to test.test_support.catch_warning() where showwarning() was not being set properly. ........ r62893 | brett.cannon | 2008-05-08 15:20:54 -0500 (Thu, 08 May 2008) | 2 lines Document the 'record' argument for test.test_support.catch_warning(). ........ r62894 | brett.cannon | 2008-05-08 15:23:06 -0500 (Thu, 08 May 2008) | 4 lines Fix sys.flags to properly expose bytes_warning. Closes issue #2790. ........ r62895 | brett.cannon | 2008-05-08 15:23:54 -0500 (Thu, 08 May 2008) | 2 lines Add a missing entry on the fix for issue #2790. ........ r62896 | brett.cannon | 2008-05-08 15:24:43 -0500 (Thu, 08 May 2008) | 2 lines Add test.test_support.catch_warning()'s new argument. ........ r62904 | benjamin.peterson | 2008-05-08 17:09:54 -0500 (Thu, 08 May 2008) | 2 lines Replace instances of os.path.walk with os.walk ........
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/archive_util.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/Lib/distutils/archive_util.py b/Lib/distutils/archive_util.py
index f3f65c6..9444ff0 100644
--- a/Lib/distutils/archive_util.py
+++ b/Lib/distutils/archive_util.py
@@ -92,18 +92,16 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0):
log.info("creating '%s' and adding '%s' to it",
zip_filename, base_dir)
- def visit (z, dirname, names):
- for name in names:
- path = os.path.normpath(os.path.join(dirname, name))
- if os.path.isfile(path):
- z.write(path, path)
- log.info("adding '%s'" % path)
-
if not dry_run:
z = zipfile.ZipFile(zip_filename, "w",
compression=zipfile.ZIP_DEFLATED)
- os.path.walk(base_dir, visit, z)
+ for dirpath, dirnames, filenames in os.walk(base_dir):
+ for name in filenames:
+ path = os.path.normpath(os.path.join(dirpath, name))
+ if os.path.isfile(path):
+ z.write(path, path)
+ log.info("adding '%s'" % path)
z.close()
return zip_filename