summaryrefslogtreecommitdiffstats
path: root/Lib/httplib.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2007-08-03 20:30:33 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2007-08-03 20:30:33 (GMT)
commitfb35f65e8b3d59b9c8f7536a6359483c7f051fda (patch)
tree288b13283ba1631c54e7c9f41f8300a21b313a63 /Lib/httplib.py
parentc0f2d2d345d5fe97f81554d49b273b3feb0e37ae (diff)
downloadcpython-fb35f65e8b3d59b9c8f7536a6359483c7f051fda.zip
cpython-fb35f65e8b3d59b9c8f7536a6359483c7f051fda.tar.gz
cpython-fb35f65e8b3d59b9c8f7536a6359483c7f051fda.tar.bz2
A few local changes for consistency of string literals.
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r--Lib/httplib.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py
index 6a16647..2f9a5c3 100644
--- a/Lib/httplib.py
+++ b/Lib/httplib.py
@@ -67,6 +67,7 @@ Req-sent-unread-response _CS_REQ_SENT <response_class>
"""
import errno
+import io
import mimetools
import socket
from urlparse import urlsplit
@@ -307,7 +308,7 @@ class HTTPMessage(mimetools.Message):
self.status = self.status + '; bad seek'
break
-class HTTPResponse:
+class HTTPResponse(io.IOBase):
# strict: If true, raise BadStatusLine if the status line can't be
# parsed as a valid HTTP/1.0 or 1.1 status line. By default it is
@@ -897,7 +898,7 @@ class HTTPConnection:
self.send(body)
def getresponse(self):
- "Get the response from the server."
+ """Get the response from the server."""
# if a prior response has been completed, then forget about it.
if self.__response and self.__response.isclosed():
@@ -1032,13 +1033,13 @@ class SSLFile(SharedSocketClient):
avail = len(self._buf)
while size is None or avail < size:
s = self._read()
- if s == '':
+ if s == "":
break
L.append(s)
avail += len(s)
all = "".join(L)
if size is None:
- self._buf = ''
+ self._buf = ""
return all
else:
self._buf = all[size:]