Mageia Bugzilla – Attachment 4945 Details for
Bug 12621
deluge bittorrent client does not respond if built-in plugin twisted enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
fixes twisted 13.1 compat -- the _parse() function was replaced by the _URI class
deluge-1.3.6_URI_class.patch (text/plain), 902 bytes, created by
Atilla ÖNTAŞ
on 2014-02-06 00:49:52 CET
(
hide
)
Description:
fixes twisted 13.1 compat -- the _parse() function was replaced by the _URI class
Filename:
MIME Type:
Creator:
Atilla ÖNTAŞ
Created:
2014-02-06 00:49:52 CET
Size:
902 bytes
patch
obsolete
>diff -Naur a/deluge/httpdownloader.py b/deluge/httpdownloader.py >--- a/deluge/httpdownloader.py 2013-02-25 19:01:07.000000000 +0200 >+++ b/deluge/httpdownloader.py 2014-02-06 01:35:11.865130401 +0200 >@@ -192,7 +192,17 @@ > headers = {} > headers["accept-encoding"] = "deflate, gzip, x-gzip" > >- scheme, host, port, path = client._parse(url) >+ # In twisted 13.1.0 the _parse() function was replaced by the _URI class >+ if hasattr(client, '_parse'): >+ scheme, host, port, path = client._parse(url) >+ else: >+ from twisted.web.client import _URI >+ uri = _URI.fromBytes(url) >+ scheme = uri.scheme >+ host = uri.host >+ port = uri.port >+ path = uri.path >+ > factory = HTTPDownloader(url, filename, callback, headers, force_filename, allow_compression) > if scheme == "https": > from twisted.internet import ssl
diff -Naur a/deluge/httpdownloader.py b/deluge/httpdownloader.py --- a/deluge/httpdownloader.py 2013-02-25 19:01:07.000000000 +0200 +++ b/deluge/httpdownloader.py 2014-02-06 01:35:11.865130401 +0200 @@ -192,7 +192,17 @@ headers = {} headers["accept-encoding"] = "deflate, gzip, x-gzip" - scheme, host, port, path = client._parse(url) + # In twisted 13.1.0 the _parse() function was replaced by the _URI class + if hasattr(client, '_parse'): + scheme, host, port, path = client._parse(url) + else: + from twisted.web.client import _URI + uri = _URI.fromBytes(url) + scheme = uri.scheme + host = uri.host + port = uri.port + path = uri.path + factory = HTTPDownloader(url, filename, callback, headers, force_filename, allow_compression) if scheme == "https": from twisted.internet import ssl
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 12621
: 4945