From 1265b45fa4840887a95d02f9a293d9c01ec1d89d Mon Sep 17 00:00:00 2001 From: Anders F Bjorklund Date: Mon, 6 Feb 2012 21:22:46 +0100 Subject: [PATCH] Only python 2.7 has _tunnel_host --- zeroinstall/injector/_download_child.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zeroinstall/injector/_download_child.py b/zeroinstall/injector/_download_child.py index a149545..3c28abe 100644 --- a/zeroinstall/injector/_download_child.py +++ b/zeroinstall/injector/_download_child.py @@ -23,7 +23,7 @@ for ca_bundle in [ class ValidatingHTTPSConnection(httplib.HTTPSConnection): def connect(self): sock = socket.create_connection((self.host, self.port), self.timeout) - if self._tunnel_host: + if hasattr(self, '_tunnel_host') and self._tunnel_host: self.sock = sock self._tunnel() sock = ssl.wrap_socket(sock, cert_reqs = ssl.CERT_REQUIRED, ca_certs = ca_bundle) -- 2.11.4.GIT