Issue #7427: improve the representation of httplib.BadStatusLine exceptions.

This commit is contained in:
Dirkjan Ochtman 2010-02-24 04:49:00 +00:00
parent e4c74e1ea2
commit ebc73dce57
3 changed files with 8 additions and 0 deletions

View file

@ -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