]> granicus.if.org Git - python/commitdiff
[Bug #945063] Get file extension correct. (2.3 bugfix candidate)
authorAndrew M. Kuchling <amk@amk.ca>
Thu, 6 May 2004 13:13:44 +0000 (13:13 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Thu, 6 May 2004 13:13:44 +0000 (13:13 +0000)
Lib/cgitb.py

index ab4c5986790cf68cb9b0145730b22d7ce77b3aa4..c65783f2ebcb9db97f019fcda393a9a071359496 100644 (file)
@@ -274,7 +274,7 @@ class Hook:
 
         if self.logdir is not None:
             import os, tempfile
-            suffix = ['.html', '.txt'][self.format=="html"]
+            suffix = ['.txt', '.html'][self.format=="html"]
             (fd, path) = tempfile.mkstemp(suffix=suffix, dir=self.logdir)
             try:
                 file = os.fdopen(fd, 'w')