diff --git a/Lib/cgitb.py b/Lib/cgitb.py index ab4c5986790..c65783f2ebc 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')