[New-bugs-announce] [issue20500] assertion failed when passing an exception object to sys.exit

Xavier de Gaye report at bugs.python.org
Mon Feb 3 14:07:09 CET 2014


New submission from Xavier de Gaye:

The following code crashes python with:

python: Objects/object.c:512: PyObject_Str: Assertion `!PyErr_Occurred()' failed.

on the tip of the default branch, but not on python 3.3.3.


import sys

error = None
try:
    raise ValueError('some text')
except ValueError as err:
    error = err

if error:
    sys.exit(error)

----------
components: Interpreter Core
messages: 210123
nosy: xdegaye
priority: normal
severity: normal
status: open
title: assertion failed when passing an exception object to sys.exit
type: crash
versions: Python 3.4, Python 3.5

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


More information about the New-bugs-announce mailing list