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
ebc73dce
Commit
ebc73dce
authored
Feb 24, 2010
by
Dirkjan Ochtman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #7427: improve the representation of httplib.BadStatusLine exceptions.
parent
e4c74e1e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
0 deletions
+8
-0
Lib/httplib.py
Lib/httplib.py
+2
-0
Lib/test/test_httplib.py
Lib/test/test_httplib.py
+4
-0
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/httplib.py
View file @
ebc73dce
...
...
@@ -1236,6 +1236,8 @@ class ResponseNotReady(ImproperConnectionState):
class
BadStatusLine
(
HTTPException
):
def
__init__
(
self
,
line
):
if
not
line
:
line
=
repr
(
line
)
self
.
args
=
line
,
self
.
line
=
line
...
...
Lib/test/test_httplib.py
View file @
ebc73dce
...
...
@@ -91,6 +91,10 @@ class BasicTest(TestCase):
resp
=
httplib
.
HTTPResponse
(
sock
)
self
.
assertRaises
(
httplib
.
BadStatusLine
,
resp
.
begin
)
def
test_bad_status_repr
(
self
):
exc
=
httplib
.
BadStatusLine
(
''
)
self
.
assertEquals
(
repr
(
exc
),
'''BadStatusLine("
\
'
\
'
",)'''
)
def
test_partial_reads
(
self
):
# if we have a lenght, the system knows when to close itself
# same behaviour than when we read the whole thing with read()
...
...
Misc/NEWS
View file @
ebc73dce
...
...
@@ -60,6 +60,8 @@ Library
- Issue #1537721: Add a writeheader() method to csv.DictWriter.
- Issue #7427: improve the representation of httplib.BadStatusLine exceptions.
Extension Modules
-----------------
...
...
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