Explorar o código

Restore Python 2.6.<6 compatibility (Fixes #1860)

Philipp Hagemeister %!s(int64=12) %!d(string=hai) anos
pai
achega
ac79fa02b8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      youtube_dl/utils.py

+ 1 - 1
youtube_dl/utils.py

@@ -547,7 +547,7 @@ def make_HTTPS_handler(opts_no_check_certificate):
 
             def connect(self):
                 sock = socket.create_connection((self.host, self.port), self.timeout)
-                if self._tunnel_host:
+                if getattr(self, '_tunnel_host', False):
                     self.sock = sock
                     self._tunnel()
                 try: