diff options
author | mkaay <mkaay@mkaay.de> | 2010-05-10 15:43:10 +0200 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2010-05-10 15:43:10 +0200 |
commit | b08291a8981be4eb57fc628e1d205a0ce253a9b8 (patch) | |
tree | b4cc86962665352bb1a36fe61d5235b76f865238 /module/network | |
parent | captcha fix, webinterface dependency output, l18n (diff) | |
download | pyload-b08291a8981be4eb57fc628e1d205a0ce253a9b8.tar.xz |
new config option (outgoing intreface)
Diffstat (limited to 'module/network')
-rwxr-xr-x | module/network/Request.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/module/network/Request.py b/module/network/Request.py index 733ab5851..1fb76d7e0 100755 --- a/module/network/Request.py +++ b/module/network/Request.py @@ -32,7 +32,7 @@ class AbortDownload(Exception): pass class Request: - def __init__(self): + def __init__(self, interface=None): self.dl_time = 0 self.dl_finished = 0 @@ -64,6 +64,7 @@ class Request: self.maxSpeed = 0 self.isSlow = False self.cookieJar = None + self.interface = interface # change this for connection information self.debug = False @@ -91,6 +92,8 @@ class Request: self.pycurl.setopt(pycurl.SSL_VERIFYPEER, 0) if self.debug: self.pycurl.setopt(pycurl.VERBOSE, 1) + if self.interface: + self.pycurl.setopt(pycurl.INTERFACE, self.interface) self.pycurl.setopt(pycurl.USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.10") |