mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Untabify to pass the -tt test.
This commit is contained in:
parent
857c4c36b9
commit
13a2c279c5
8 changed files with 775 additions and 775 deletions
|
@ -44,27 +44,27 @@ HTTPS_PORT = 443
|
|||
|
||||
class FakeSocket:
|
||||
def __init__(self, sock, ssl):
|
||||
self.__sock = sock
|
||||
self.__ssl = ssl
|
||||
return
|
||||
self.__sock = sock
|
||||
self.__ssl = ssl
|
||||
return
|
||||
|
||||
def makefile(self, mode): # hopefully, never have to write
|
||||
msgbuf = ""
|
||||
while 1:
|
||||
try:
|
||||
msgbuf = msgbuf + self.__ssl.read()
|
||||
except socket.sslerror, msg:
|
||||
break
|
||||
return StringIO(msgbuf)
|
||||
def makefile(self, mode): # hopefully, never have to write
|
||||
msgbuf = ""
|
||||
while 1:
|
||||
try:
|
||||
msgbuf = msgbuf + self.__ssl.read()
|
||||
except socket.sslerror, msg:
|
||||
break
|
||||
return StringIO(msgbuf)
|
||||
|
||||
def send(self, stuff, flags = 0):
|
||||
return self.__ssl.write(stuff)
|
||||
return self.__ssl.write(stuff)
|
||||
|
||||
def recv(self, len = 1024, flags = 0):
|
||||
return self.__ssl.read(len)
|
||||
return self.__ssl.read(len)
|
||||
|
||||
def __getattr__(self, attr):
|
||||
return getattr(self.__sock, attr)
|
||||
return getattr(self.__sock, attr)
|
||||
|
||||
class HTTP:
|
||||
"""This class manages a connection to an HTTP server."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue