|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. Thanks again to your contribution and we look forward to looking at it! |
| self._sampwidth = (sampwidth + 7) // 8 | ||
| else: | ||
| raise Error('unknown format: %r' % (wFormatTag,)) | ||
| if self._channels == 0: |
There was a problem hiding this comment.
If I am not mistaken, then this attribute was called _nchannels in previous versions of Python, i.e. 3.4.x. It might be a good idea to use the getnchannels() method to access this information instead, which abstracts the concrete name. This has the advantage of making this patch applicable to previous versions of Python, too.
|
This PR has been superseded by the discussion in bpo-32056 where it was decided to not try to address this a bug in 3.6. |
I found a bug in wave.py because there is no check for self._channel in fmt reading function.
When I try to open a wav file which channel is zero, it will crash bacause of divided by zero in initfp function.