File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -293,14 +293,19 @@ def handle(self, info=None):
293293 if self .logdir is not None :
294294 suffix = ['.txt' , '.html' ][self .format == "html" ]
295295 (fd , path ) = tempfile .mkstemp (suffix = suffix , dir = self .logdir )
296+
296297 try :
297298 file = os .fdopen (fd , 'w' )
298299 file .write (doc )
299300 file .close ()
300- msg = '<p> %s contains the description of this error.' % path
301+ msg = '%s contains the description of this error.' % path
301302 except :
302- msg = '<p> Tried to save traceback to %s, but failed.' % path
303- self .file .write (msg + '\n ' )
303+ msg = 'Tried to save traceback to %s, but failed.' % path
304+
305+ if self .format == 'html' :
306+ self .file .write ('<p>%s</p>\n ' % msg )
307+ else :
308+ self .file .write (msg + '\n ' )
304309 try :
305310 self .file .flush ()
306311 except : pass
Original file line number Diff line number Diff line change @@ -699,6 +699,7 @@ Mark Mc Mahon
699699Gordon McMillan
700700Caolan McNamara
701701Andrew McNamara
702+ Jeff McNeil
702703Craig McPheeters
703704Lambert Meertens
704705Bill van Melle
Original file line number Diff line number Diff line change @@ -132,6 +132,9 @@ Core and Builtins
132132Library
133133-------
134134
135+ - Issue #12890: cgitb no longer prints spurious <p> tags in text
136+ mode when the logdir option is specified.
137+
135138- Issue #16250: Fix URLError invocation with proper args.
136139
137140- Issue #16305: Fix a segmentation fault occurring when interrupting
You can’t perform that action at this time.
0 commit comments