Message350614
__repr__() implementations of buffered and text streams try to include the value of "name" and "mode" attributes in the result. But they silence too wide range of exceptions (all subclasses of Exception) when try to get these values. This includes such exceptions as MemoryError or RecursionError which can be occurred in virtually any code.
The proposed PR narrows the range of silenced exceptions to the necessary minimum: expected AttributeError and ValueError. The latter is raised if the underlying stream was detached. |
|
Date |
User |
Action |
Args |
2019-08-27 07:49:40 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka |
2019-08-27 07:49:40 | serhiy.storchaka | set | messageid: <1566892180.39.0.647932070898.issue37960@roundup.psfhosted.org> |
2019-08-27 07:49:40 | serhiy.storchaka | link | issue37960 messages |
2019-08-27 07:49:40 | serhiy.storchaka | create | |
|