Downloader: Adjust for new twisted
authorLittlesat <littlesat99@yahoo.com>
Fri, 5 Sep 2014 15:50:44 +0000 (17:50 +0200)
committerLittlesat <littlesat99@yahoo.com>
Fri, 5 Sep 2014 15:50:44 +0000 (17:50 +0200)
http://openpli.org/forums/topic/34909-imdb-gsod-after-update-today/

lib/python/Tools/Downloader.py

index 7649cf9..ba5bf0a 100644 (file)
@@ -37,7 +37,10 @@ class HTTPProgressDownloader(client.HTTPDownloader):
 
 class downloadWithProgress:
        def __init__(self, url, outputfile, contextFactory=None, *args, **kwargs):
-               scheme, host, port, path = client._parse(url)
+               parsed = urlparse(url)
+               scheme = parsed.scheme
+               host = parsed.hostname
+               port = parsed.port or (443 if scheme == 'https' else 80)
                self.factory = HTTPProgressDownloader(url, outputfile, *args, **kwargs)
                self.connection = reactor.connectTCP(host, port, self.factory)