mirror of
https://github.com/python/cpython.git
synced 2025-08-12 04:49:01 +00:00
Guard shutil._make_archive against a logger=None argument.
Backporting two lines from the 3.x tests was enough to trigger the bug. I also took the opportunity of making the logging call lazy.
This commit is contained in:
parent
99c4c340e6
commit
e7329f47e7
3 changed files with 8 additions and 1 deletions
|
@ -359,7 +359,8 @@ def _make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0,
|
|||
archive_dir = os.path.dirname(archive_name)
|
||||
|
||||
if not os.path.exists(archive_dir):
|
||||
logger.info("creating %s" % archive_dir)
|
||||
if logger is not None:
|
||||
logger.info("creating %s", archive_dir)
|
||||
if not dry_run:
|
||||
os.makedirs(archive_dir)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue