]> granicus.if.org Git - python/commitdiff
Fix
authorMichael W. Hudson <mwh@python.net>
Sat, 7 Aug 2004 21:13:46 +0000 (21:13 +0000)
committerMichael W. Hudson <mwh@python.net>
Sat, 7 Aug 2004 21:13:46 +0000 (21:13 +0000)
[ 777659 ] Uninitialized variable used in Tools/faqwiz/faqwiz.py

with help from jlgijsbers on #python-dev IRC.

Tools/faqwiz/faqwiz.py

index 00cc65c472e51e0bafcd19586c2239bc3295e59e..bdd270c380142c80aef073673923333e01365392 100644 (file)
@@ -808,7 +808,7 @@ class FaqWizard:
 
         import tempfile
         tf = tempfile.NamedTemporaryFile()
-        emit(LOGHEADER, self.ui, os.environ, date=date, _file=tfn)
+        emit(LOGHEADER, self.ui, os.environ, date=date, _file=tf)
         tf.flush()
         tf.seek(0)
 
@@ -830,7 +830,7 @@ class FaqWizard:
         print '<PRE>%s</PRE>' % escape(output)
 
         try:
-            os.unlink(tfn)
+            os.unlink(tf.name)
         except os.error:
             pass