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

UnboundLocalError raised by atexit module #41308

Closed
loechelt mannequin opened this issue Dec 10, 2004 · 2 comments
Closed

UnboundLocalError raised by atexit module #41308

loechelt mannequin opened this issue Dec 10, 2004 · 2 comments
Labels
stdlib Python modules in the Lib dir

Comments

@loechelt
Copy link
Mannequin

loechelt mannequin commented Dec 10, 2004

BPO 1083202
Nosy @rhettinger
Files
  • atexit.py: atexit.py file with patch for missing import statement
  • atexit.py: atexit.py file with patch for missing import statement
  • 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 = None
    closed_at = <Date 2004-12-11.02:54:02.000>
    created_at = <Date 2004-12-10.21:39:35.000>
    labels = ['library']
    title = 'UnboundLocalError raised by atexit module'
    updated_at = <Date 2004-12-11.02:54:02.000>
    user = 'https://bugs.python.org/loechelt'

    bugs.python.org fields:

    activity = <Date 2004-12-11.02:54:02.000>
    actor = 'rhettinger'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2004-12-10.21:39:35.000>
    creator = 'loechelt'
    dependencies = []
    files = ['1529', '1530']
    hgrepos = []
    issue_num = 1083202
    keywords = []
    message_count = 2.0
    messages = ['23645', '23646']
    nosy_count = 2.0
    nosy_names = ['rhettinger', 'loechelt']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1083202'
    versions = ['Python 2.4']

    @loechelt
    Copy link
    Mannequin Author

    loechelt mannequin commented Dec 10, 2004

    The following exception is raised on exit by Python 2.4
    under certain circumstances:

    Error in sys.exitfunc:
    Traceback (most recent call last):
      File
    "/usr/local/python/python2.4/lib/python2.4/atexit.py",
    line 24, in _run_exitfuncs
        exc_info = sys.exc_info()
    UnboundLocalError: local variable 'sys' referenced
    before assignment

    I traced the problem to a missing import statement in
    the atexit.py file. I am enclosing a corrected file
    with the patch.

    Gary H. Loechelt

    @loechelt loechelt mannequin closed this as completed Dec 10, 2004
    @loechelt loechelt mannequin added the stdlib Python modules in the Lib dir label Dec 10, 2004
    @loechelt loechelt mannequin closed this as completed Dec 10, 2004
    @loechelt loechelt mannequin added the stdlib Python modules in the Lib dir label Dec 10, 2004
    @rhettinger
    Copy link
    Contributor

    Logged In: YES
    user_id=80475

    Fixed.
    See Lib/atexit.py 1.9 and 1.8.2.1.
    Thanks for the bug report.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant