A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-August/068076.html below:

[Python-Dev] Is this a bug?

[Python-Dev] Is this a bug?Georg Brandl g.brandl at gmx.net
Wed Aug 9 16:40:33 CEST 2006
Is this considered a bug? Sure, deleting modules from sys.modules
isn't quite common, but it happened to me on one occasion.

Python 2.4.3 (#1, Jul 29 2006, 10:52:20)
 >>> import logging
 >>> import sys
 >>> del logging
 >>> del sys.modules['logging']
 >>> ^D
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
   File "/usr/lib/python2.4/atexit.py", line 24, in _run_exitfuncs
     func(*targs, **kargs)
   File "/usr/lib/python2.4/logging/__init__.py", line 1328, in shutdown
     for h in _handlerList[:]: # was _handlers.keys():
TypeError: unsubscriptable object
Error in sys.exitfunc:
Traceback (most recent call last):
   File "/usr/lib/python2.4/atexit.py", line 24, in _run_exitfuncs
     func(*targs, **kargs)
   File "/usr/lib/python2.4/logging/__init__.py", line 1328, in shutdown
     for h in _handlerList[:]: # was _handlers.keys():
TypeError: unsubscriptable object

Obviously, _handlerList (as a global) is already cleaned up, which is why
the subscript fails.

Georg

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4