gh-136523: Fix wave.Wave_write emitting an unraisable when open raises (GH-136529)

This commit is contained in:
Sachin Shah 2025-07-13 01:49:12 -04:00 committed by GitHub
parent 42b251bceb
commit 171de05b48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 0 deletions

View file

@ -427,6 +427,8 @@ class Wave_write:
_datawritten -- the size of the audio samples actually written
"""
_file = None
def __init__(self, f):
self._i_opened_the_file = None
if isinstance(f, str):