[issue4643] cgitb.html fails if getattr call raises exception

Irit Katriel report at bugs.python.org
Fri Jan 1 10:17:00 EST 2021


Irit Katriel <iritkatriel at yahoo.com> added the comment:

On closer scrutiny I'm not sure this patch should be merged. 

The getattr call here has a default value, so it should not raise AttributeError. It should also not raise any other exception because a valid implementation of __getattr__ should raise only AttributeError:

https://docs.python.org/3/reference/datamodel.html#object.__getattr__

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue4643>
_______________________________________


More information about the Python-bugs-list mailing list