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.
diff --git a/Lib/shutil.py b/Lib/shutil.py
index 9d922fb..59a38fe 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -359,7 +359,8 @@
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)