Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
54eed2e3
Commit
54eed2e3
authored
Oct 27, 2012
by
R David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#12890: don't emit <p> tags in text mode when logdir specified.
Patch by Jeff McNeil.
parent
3e66f0d1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
Lib/cgitb.py
Lib/cgitb.py
+8
-3
Misc/ACKS
Misc/ACKS
+1
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/cgitb.py
View file @
54eed2e3
...
@@ -295,13 +295,18 @@ class Hook:
...
@@ -295,13 +295,18 @@ class Hook:
if
self
.
logdir
is
not
None
:
if
self
.
logdir
is
not
None
:
suffix
=
[
'.txt'
,
'.html'
][
self
.
format
==
"html"
]
suffix
=
[
'.txt'
,
'.html'
][
self
.
format
==
"html"
]
(
fd
,
path
)
=
tempfile
.
mkstemp
(
suffix
=
suffix
,
dir
=
self
.
logdir
)
(
fd
,
path
)
=
tempfile
.
mkstemp
(
suffix
=
suffix
,
dir
=
self
.
logdir
)
try
:
try
:
file
=
os
.
fdopen
(
fd
,
'w'
)
file
=
os
.
fdopen
(
fd
,
'w'
)
file
.
write
(
doc
)
file
.
write
(
doc
)
file
.
close
()
file
.
close
()
msg
=
'
<p>
%s contains the description of this error.'
%
path
msg
=
'%s contains the description of this error.'
%
path
except
:
except
:
msg
=
'<p> Tried to save traceback to %s, but failed.'
%
path
msg
=
'Tried to save traceback to %s, but failed.'
%
path
if
self
.
format
==
'html'
:
self
.
file
.
write
(
'<p>%s</p>
\
n
'
%
msg
)
else
:
self
.
file
.
write
(
msg
+
'
\
n
'
)
self
.
file
.
write
(
msg
+
'
\
n
'
)
try
:
try
:
self
.
file
.
flush
()
self
.
file
.
flush
()
...
...
Misc/ACKS
View file @
54eed2e3
...
@@ -644,6 +644,7 @@ Mark Mc Mahon
...
@@ -644,6 +644,7 @@ Mark Mc Mahon
Gordon McMillan
Gordon McMillan
Caolan McNamara
Caolan McNamara
Andrew McNamara
Andrew McNamara
Jeff McNeil
Craig McPheeters
Craig McPheeters
Lambert Meertens
Lambert Meertens
Bill van Melle
Bill van Melle
...
...
Misc/NEWS
View file @
54eed2e3
...
@@ -122,6 +122,9 @@ Core and Builtins
...
@@ -122,6 +122,9 @@ Core and Builtins
Library
Library
-------
-------
-
Issue
#
12890
:
cgitb
no
longer
prints
spurious
<
p
>
tags
in
text
mode
when
the
logdir
option
is
specified
.
-
Issue
#
14398
:
Fix
size
truncation
and
overflow
bugs
in
the
bz2
module
.
-
Issue
#
14398
:
Fix
size
truncation
and
overflow
bugs
in
the
bz2
module
.
-
Issue
#
5148
:
Ignore
'U'
in
mode
given
to
gzip
.
open
()
and
gzip
.
GzipFile
().
-
Issue
#
5148
:
Ignore
'U'
in
mode
given
to
gzip
.
open
()
and
gzip
.
GzipFile
().
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment