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

(cherry picked from commit 171de05b48)

Co-authored-by: Sachin Shah <39803835+inventshah@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2025-07-13 08:13:01 +02:00 committed by GitHub
parent bec9bdf619
commit c4386499f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 0 deletions

View file

@ -441,6 +441,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):