[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

kai zhu report at bugs.python.org
Wed Dec 22 08:58:36 CET 2010


New submission from kai zhu <kaizhu256 at gmail.com>:

public at colinux 3 ~: python3.2
Python 3.2b2 (py3k, Dec 22 2010, 02:38:55) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import atexit; atexit.register(lambda:1/0)
<function <lambda> at 0xb7c7e12c>
>>> exit()
Error in atexit._run_exitfuncs:
TypeError: print_exception(): Exception expected for value, str found



might b related to Issue5089, so included those ppl to nosy.  this bug is subtle.  unit tests which explicitly 'raise' exceptions will not b caught, e.g. this will raise properly:

@exit.register
def foo(): raise ZeroDivisionError()

----------
components: Interpreter Core
messages: 124490
nosy: BreamoreBoy, kaizhu, mark.dickinson
priority: normal
severity: normal
status: open
title: Error in atexit._run_exitfuncs [...]  Exception expected for value, str found
type: behavior
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10756>
_______________________________________


More information about the Python-bugs-list mailing list