This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: logger statement not guarded in shutil._make_tarball
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: eric.araujo, fdrake, georg.brandl, kelsey.hightower, paulsmith, rhettinger, tarek, v_peter
Priority: normal Keywords: easy, patch

Created on 2010-07-06 00:04 by paulsmith, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
shutil_logger_py27.patch paulsmith, 2010-07-06 00:04 Fixes _make_tarball is logger is None
shutil_logger_with_test.py27.patch v_peter, 2010-11-16 23:18 review
Messages (8)
msg109364 - (view) Author: Paul Smith (paulsmith) Date: 2010-07-06 00:04
A called to logger.info() in shutil._make_tarball is not guarded against the logger being None, and therefore raises an AttributeError if that is the case.
msg111229 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2010-07-23 00:11
Patch looks good, but needs a test.
msg121327 - (view) Author: (v_peter) Date: 2010-11-16 23:18
Added a test to the patch
msg121388 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-11-17 22:40
Patch looks good.

By the way, the logger argument is not documented in shutil.rst.
msg121434 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2010-11-18 03:32
> By the way, the logger argument is not documented in shutil.rst.

This documentation issue is distinct from this; this bug affects applications that *don't* use the logger argument.
msg127861 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-02-04 02:49
Duplicate report #11045 was opened recently; I didn’t remember this report and committed a one-line fix without a test.  Should we try to get a test into 3.2.0?
msg130011 - (view) Author: (v_peter) Date: 2011-03-03 22:52
I think it would be nice to get this test in.
msg142437 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-08-19 12:43
I fixed this in 615a29295d5f but forgot to mention the bug number in the commit message.  To reproduce the bug, I only had to backport two lines from 3.2, so I did not use your patch.  Thanks to both of you nonetheless for the report and help!
History
Date User Action Args
2022-04-11 14:57:03adminsetgithub: 53419
2011-08-19 12:43:09eric.araujosetstatus: open -> closed
versions: - Python 3.1, Python 3.2
messages: + msg142437

assignee: tarek -> eric.araujo
resolution: fixed
stage: patch review -> resolved
2011-03-03 22:52:06v_petersetnosy: fdrake, georg.brandl, rhettinger, paulsmith, tarek, eric.araujo, v_peter, kelsey.hightower
messages: + msg130011
2011-02-04 02:49:09eric.araujosetnosy: + rhettinger, georg.brandl, kelsey.hightower
messages: + msg127861
2010-11-18 03:32:15fdrakesetmessages: + msg121434
2010-11-17 22:40:04eric.araujosetversions: - Python 2.6, Python 3.3
nosy: + eric.araujo

messages: + msg121388

stage: patch review
2010-11-16 23:18:51v_petersetfiles: + shutil_logger_with_test.py27.patch
nosy: + v_peter
messages: + msg121327

2010-08-08 08:56:15tareksetassignee: tarek
versions: + Python 2.6, Python 3.1, Python 3.2, Python 3.3
2010-07-23 10:53:31fdrakesetnosy: + tarek
2010-07-23 00:11:14fdrakesetkeywords: + easy
nosy: + fdrake
messages: + msg111229

2010-07-06 00:04:58paulsmithcreate