diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-04-05 06:37:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-05 06:37:24 (GMT) |
commit | 5affd23e6f42125998724787025080a24839266e (patch) | |
tree | 8b7ca82362e78a32805b117d574082d512251d3c /Lib/aifc.py | |
parent | 43ba8861e0ad044efafa46a7cc04e12ac5df640e (diff) | |
download | cpython-5affd23e6f42125998724787025080a24839266e.zip cpython-5affd23e6f42125998724787025080a24839266e.tar.gz cpython-5affd23e6f42125998724787025080a24839266e.tar.bz2 |
bpo-29762: More use "raise from None". (#569)
This hides unwanted implementation details from tracebacks.
Diffstat (limited to 'Lib/aifc.py')
-rw-r--r-- | Lib/aifc.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/aifc.py b/Lib/aifc.py index 13ad7dc..49a456a 100644 --- a/Lib/aifc.py +++ b/Lib/aifc.py @@ -149,25 +149,25 @@ def _read_long(file): try: return struct.unpack('>l', file.read(4))[0] except struct.error: - raise EOFError + raise EOFError from None def _read_ulong(file): try: return struct.unpack('>L', file.read(4))[0] except struct.error: - raise EOFError + raise EOFError from None def _read_short(file): try: return struct.unpack('>h', file.read(2))[0] except struct.error: - raise EOFError + raise EOFError from None def _read_ushort(file): try: return struct.unpack('>H', file.read(2))[0] except struct.error: - raise EOFError + raise EOFError from None def _read_string(file): length = ord(file.read(1)) |