From: Andrew M. Kuchling Date: Thu, 6 May 2004 13:13:44 +0000 (+0000) Subject: [Bug #945063] Get file extension correct. (2.3 bugfix candidate) X-Git-Tag: v2.4a1~437 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=30633c9a6423459cdd481a6e44954d5933c7842b;p=python [Bug #945063] Get file extension correct. (2.3 bugfix candidate) --- diff --git a/Lib/cgitb.py b/Lib/cgitb.py index ab4c598679..c65783f2eb 100644 --- a/Lib/cgitb.py +++ b/Lib/cgitb.py @@ -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')