[issue32056] Improve exceptions in aifc, sunau and wave

Serhiy Storchaka report at bugs.python.org
Thu Mar 1 11:00:55 EST 2018


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

PR 5951 adds explicit checks for the number of channels and sample width when read audio files in aifc, sunau and wave and converts some struct.error to EOFError when the file is truncated in wave.

This change can break an existing code that currently successfully opens corrupted audio files and read only headers, but not audio samples. Therefore it is safer to not backport it, even if classify this issue as a bug.

----------
title: Improve exceptions in Lib/wave.py -> Improve exceptions in aifc, sunau and wave
versions: +Python 3.8

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


More information about the Python-bugs-list mailing list