diff options
Diffstat (limited to 'Lib/_pyio.py')
| -rw-r--r-- | Lib/_pyio.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/_pyio.py b/Lib/_pyio.py index d507cfe..3614644 100644 --- a/Lib/_pyio.py +++ b/Lib/_pyio.py @@ -812,7 +812,7 @@ class _BufferedIOMixin(BufferedIOBase): clsname = self.__class__.__qualname__ try: name = self.name - except AttributeError: + except Exception: return "<{}.{}>".format(modname, clsname) else: return "<{}.{} name={!r}>".format(modname, clsname, name) @@ -1640,13 +1640,13 @@ class TextIOWrapper(TextIOBase): self.__class__.__qualname__) try: name = self.name - except AttributeError: + except Exception: pass else: result += " name={0!r}".format(name) try: mode = self.mode - except AttributeError: + except Exception: pass else: result += " mode={0!r}".format(mode) |
