Claudiu Popa added the comment:
This was recently fixed in 3.5 by 73afda5a4e4c.
--
nosy: +Claudiu.Popa
resolution: - fixed
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10805
Giovanni Funchal gafunc...@gmail.com added the comment:
This bug affects me, found it when migrating from 2.7 to 3.2, in a function
calling traceback.print_exc() called while there were no active exception
being handled. Previous behavior was to print None.
--
nosy: +Giovanni.Funchal
Boris FELD lothiral...@gmail.com added the comment:
I add a test to test_traceback.py for this bug. Bug is confirmed on python 3.2
and python3.3. I use 2.x behavior as reference.
I don't know if we should add an assertion in traceback.print_exception or
traceback._iter_chain, so I add the
Antoine Pitrou pit...@free.fr added the comment:
Well, under 2.x, print_traceback(None, None, None) would just print None, but
I'm not sure that's a supported use case.
--
nosy: +ncoghlan
___
Python tracker rep...@bugs.python.org
New submission from Austin Bingham austin.bing...@gmail.com:
traceback.print_exception() will throw an AttributeException if `value` is None
and `chain` is True. This is because `_iter_chain` assumes that the exception
object has a `__cause__` attribute. You can trigger this by trying for
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +pitrou
versions: +Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10805
___
___