diff options
| author | Benjamin Peterson <benjamin@python.org> | 2014-12-22 03:00:51 (GMT) |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2014-12-22 03:00:51 (GMT) |
| commit | 98beb7599e7b5991f92f1c0bd83ce7e50f1cdc33 (patch) | |
| tree | 00175e19bf10ce9fdaaa75e1c7580bb3d296c529 /Lib/_pyio.py | |
| parent | 4d6a3d6c01abc468ec85395c58f1a36f6f16560e (diff) | |
| parent | 10e76b67c9bb2f6febeb7f264478532cbe985ecd (diff) | |
| download | cpython-98beb7599e7b5991f92f1c0bd83ce7e50f1cdc33.zip cpython-98beb7599e7b5991f92f1c0bd83ce7e50f1cdc33.tar.gz cpython-98beb7599e7b5991f92f1c0bd83ce7e50f1cdc33.tar.bz2 | |
merge 3.4 (#23093)
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) |
