diff options
author | Thomas Wouters <thomas@python.org> | 2007-08-30 21:54:39 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2007-08-30 21:54:39 (GMT) |
commit | a6900e8d720df0fbbe0da5d26e61bf187f1fa74a (patch) | |
tree | 780be1c533afefe83ea57cee69d267f7d1b70bcf /Lib/httplib.py | |
parent | dcb3c382ac0977a72ef562759b0ec08e4d8468ad (diff) | |
download | cpython-a6900e8d720df0fbbe0da5d26e61bf187f1fa74a.zip cpython-a6900e8d720df0fbbe0da5d26e61bf187f1fa74a.tar.gz cpython-a6900e8d720df0fbbe0da5d26e61bf187f1fa74a.tar.bz2 |
Don't lie in __all__ attributes when SSL is not available: only add the SSL
classes when they are actually created.
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r-- | Lib/httplib.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py index 599a331..b9e59d0 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py @@ -76,7 +76,7 @@ try: except ImportError: from StringIO import StringIO -__all__ = ["HTTP", "HTTPResponse", "HTTPConnection", "HTTPSConnection", +__all__ = ["HTTP", "HTTPResponse", "HTTPConnection", "HTTPException", "NotConnected", "UnknownProtocol", "UnknownTransferEncoding", "UnimplementedFileMode", "IncompleteRead", "InvalidURL", "ImproperConnectionState", @@ -1052,6 +1052,7 @@ else: sock = socket.create_connection((self.host, self.port), self.timeout) self.sock = ssl.sslsocket(sock, self.key_file, self.cert_file) + __all__.append("HTTPSConnection") class HTTPS(HTTP): """Compatibility with 1.5 httplib interface |