Commit c1098e90 authored by Martin v. Löwis's avatar Martin v. Löwis

Replace os.path.walk with os.walk.

--HG--
branch : distribute
extra : rebase_source : 9bc223da3173d759f3c59eb72138e7405b4384ed
parent 1319d728
...@@ -525,9 +525,11 @@ def make_zipfile(zip_filename, base_dir, verbose=0, dry_run=0, compress=None, ...@@ -525,9 +525,11 @@ def make_zipfile(zip_filename, base_dir, verbose=0, dry_run=0, compress=None,
compression = [zipfile.ZIP_STORED, zipfile.ZIP_DEFLATED][bool(compress)] compression = [zipfile.ZIP_STORED, zipfile.ZIP_DEFLATED][bool(compress)]
if not dry_run: if not dry_run:
z = zipfile.ZipFile(zip_filename, mode, compression=compression) z = zipfile.ZipFile(zip_filename, mode, compression=compression)
os.path.walk(base_dir, visit, z) for dirname, dirs, files in os.walk(base_dir):
visit(z, dirname, files)
z.close() z.close()
else: else:
os.path.walk(base_dir, visit, None) for dirname, dirs, files in os.walk(base_dir):
visit(None, dirname, file)
return zip_filename return zip_filename
# #
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment