From: Andrew M. Kuchling Date: Thu, 6 May 2004 13:18:26 +0000 (+0000) Subject: [Bug #945063 backport] Get file extension correct. X-Git-Tag: v2.3.4c1~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d532acd6ba6e8c7e5c9d62611253601d01659501;p=thirdparty%2FPython%2Fcpython.git [Bug #945063 backport] Get file extension correct. --- diff --git a/Lib/cgitb.py b/Lib/cgitb.py index cd469adb48f7..1f03da7154e8 100644 --- a/Lib/cgitb.py +++ b/Lib/cgitb.py @@ -273,7 +273,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')