mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
shutil: removed unused import and fixed attributes names in _call_external_zip
This commit is contained in:
parent
f0a4cceba6
commit
62e17ad234
1 changed files with 2 additions and 3 deletions
|
@ -9,7 +9,6 @@ import sys
|
||||||
import stat
|
import stat
|
||||||
from os.path import abspath
|
from os.path import abspath
|
||||||
import fnmatch
|
import fnmatch
|
||||||
from warnings import warn
|
|
||||||
import collections
|
import collections
|
||||||
import errno
|
import errno
|
||||||
|
|
||||||
|
@ -393,7 +392,7 @@ def _make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0,
|
||||||
|
|
||||||
return archive_name
|
return archive_name
|
||||||
|
|
||||||
def _call_external_zip(directory, verbose=False):
|
def _call_external_zip(base_dir, zip_filename, verbose=False, dry_run=False):
|
||||||
# XXX see if we want to keep an external call here
|
# XXX see if we want to keep an external call here
|
||||||
if verbose:
|
if verbose:
|
||||||
zipoptions = "-r"
|
zipoptions = "-r"
|
||||||
|
@ -437,7 +436,7 @@ def _make_zipfile(base_name, base_dir, verbose=0, dry_run=0, logger=None):
|
||||||
zipfile = None
|
zipfile = None
|
||||||
|
|
||||||
if zipfile is None:
|
if zipfile is None:
|
||||||
_call_external_zip(base_dir, verbose)
|
_call_external_zip(base_dir, zip_filename, verbose, dry_run)
|
||||||
else:
|
else:
|
||||||
if logger is not None:
|
if logger is not None:
|
||||||
logger.info("creating '%s' and adding '%s' to it",
|
logger.info("creating '%s' and adding '%s' to it",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue