From 7b39b6c1b68c19e1d719df3face06f5103a25dbe Mon Sep 17 00:00:00 2001 From: calvin Date: Fri, 15 Sep 2006 20:10:14 +0000 Subject: [PATCH] add HTTPConnection.is_idle(), print response in HTTPConnection.__str__() git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3446 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkcheck/httplib2.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/linkcheck/httplib2.py b/linkcheck/httplib2.py index 78b143a5..72f983ba 100644 --- a/linkcheck/httplib2.py +++ b/linkcheck/httplib2.py @@ -594,8 +594,9 @@ class HTTPConnection: self.strict = strict def __str__ (self): - return "" % \ - (self.__state, self._method, self.sock, self._buffer) + return "" % \ + (self.__state, self._method, self.sock, self._buffer, self.__response) def _set_hostport(self, host, port): if port is None: @@ -895,6 +896,9 @@ class HTTPConnection: return response + def is_idle (self): + return self.__state == _CS_IDLE + # The next several classes are used to define FakeSocket,a socket-like # interface to an SSL connection.