Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logger statement not guarded in shutil._make_tarball #53419

Closed
paulsmith mannequin opened this issue Jul 6, 2010 · 8 comments
Closed

logger statement not guarded in shutil._make_tarball #53419

paulsmith mannequin opened this issue Jul 6, 2010 · 8 comments
Assignees
Labels
easy stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@paulsmith
Copy link
Mannequin

paulsmith mannequin commented Jul 6, 2010

BPO 9173
Nosy @freddrake, @birkenfeld, @rhettinger, @tarekziade, @merwok
Files
  • shutil_logger_py27.patch: Fixes _make_tarball is logger is None
  • shutil_logger_with_test.py27.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/merwok'
    closed_at = <Date 2011-08-19.12:43:09.469>
    created_at = <Date 2010-07-06.00:04:58.138>
    labels = ['easy', 'type-bug', 'library']
    title = 'logger statement not guarded in shutil._make_tarball'
    updated_at = <Date 2011-08-19.12:43:09.467>
    user = 'https://bugs.python.org/paulsmith'

    bugs.python.org fields:

    activity = <Date 2011-08-19.12:43:09.467>
    actor = 'eric.araujo'
    assignee = 'eric.araujo'
    closed = True
    closed_date = <Date 2011-08-19.12:43:09.469>
    closer = 'eric.araujo'
    components = ['Library (Lib)']
    creation = <Date 2010-07-06.00:04:58.138>
    creator = 'paulsmith'
    dependencies = []
    files = ['17878', '19620']
    hgrepos = []
    issue_num = 9173
    keywords = ['patch', 'easy']
    message_count = 8.0
    messages = ['109364', '111229', '121327', '121388', '121434', '127861', '130011', '142437']
    nosy_count = 8.0
    nosy_names = ['fdrake', 'georg.brandl', 'rhettinger', 'paulsmith', 'tarek', 'eric.araujo', 'v_peter', 'kelsey.hightower']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue9173'
    versions = ['Python 2.7']

    @paulsmith
    Copy link
    Mannequin Author

    paulsmith mannequin commented Jul 6, 2010

    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.

    @paulsmith paulsmith mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Jul 6, 2010
    @freddrake
    Copy link
    Member

    Patch looks good, but needs a test.

    @freddrake freddrake added the easy label Jul 23, 2010
    @tarekziade tarekziade mannequin self-assigned this Aug 8, 2010
    @vpeter
    Copy link
    Mannequin

    vpeter mannequin commented Nov 16, 2010

    Added a test to the patch

    @merwok
    Copy link
    Member

    merwok commented Nov 17, 2010

    Patch looks good.

    By the way, the logger argument is not documented in shutil.rst.

    @freddrake
    Copy link
    Member

    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.

    @merwok
    Copy link
    Member

    merwok commented Feb 4, 2011

    Duplicate report bpo-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?

    @vpeter
    Copy link
    Mannequin

    vpeter mannequin commented Mar 3, 2011

    I think it would be nice to get this test in.

    @merwok
    Copy link
    Member

    merwok commented Aug 19, 2011

    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!

    @merwok merwok closed this as completed Aug 19, 2011
    @merwok merwok assigned merwok and unassigned tarekziade Aug 19, 2011
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    easy stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants