From 6ed9df264136007c654201ee58ca15f10124882a Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 17 Dec 1993 16:43:43 +0000 Subject: [PATCH] * aifc.py (Aifc_write): fix bogus reference to filename --- Lib/aifc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/aifc.py b/Lib/aifc.py index a603314697a..e06b7766ef4 100644 --- a/Lib/aifc.py +++ b/Lib/aifc.py @@ -637,7 +637,10 @@ class Aifc_write: def __init__(self, f): if type(f) == type(''): + filename = f f = builtin.open(f, 'w') + else: + filename = '???' # else, assume it is an open file object already self.initfp(f) if filename[-5:] == '.aiff':