[Python-checkins] r88240 - in python/branches/py3k: Lib/shutil.py Misc/NEWS
eric.araujo
python-checkins at python.org
Sat Jan 29 21:32:11 CET 2011
Author: eric.araujo
Date: Sat Jan 29 21:32:11 2011
New Revision: 88240
Log:
Protect logging call against None argument (fixes #11045).
Initial patch by Kelsey Hightower. Approved by Raymond. A test was
non-trivial to write without calling the private function directly, so
we moved that for later.
Modified:
python/branches/py3k/Lib/shutil.py
python/branches/py3k/Misc/NEWS
Modified: python/branches/py3k/Lib/shutil.py
==============================================================================
--- python/branches/py3k/Lib/shutil.py (original)
+++ python/branches/py3k/Lib/shutil.py Sat Jan 29 21:32:11 2011
@@ -391,7 +391,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)
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Sat Jan 29 21:32:11 2011
@@ -16,6 +16,8 @@
Library
-------
+- Issue #11045: Protect logging call against None argument.
+
- Issue #11052: Correct IDLE menu accelerators on Mac OS X for Save
commands.
More information about the Python-checkins
mailing list