try to fix possible network/proxy problem

This commit is contained in:
Marcos Pinto 2008-07-23 19:55:02 +00:00
parent 8d5d30205e
commit 0fb159bd92
1 changed files with 5 additions and 4 deletions

View File

@ -950,10 +950,11 @@ class Core(
log.debug("Proxy value %s set to %s..", key, value) log.debug("Proxy value %s set to %s..", key, value)
proxy_settings = lt.proxy_settings() proxy_settings = lt.proxy_settings()
proxy_settings.proxy_type = lt.proxy_type(self.config["proxy_type"]) proxy_settings.proxy_type = lt.proxy_type(self.config["proxy_type"])
proxy_settings.username = self.config["proxy_username"] if self.config["proxy_type"] != 0:
proxy_settings.password = self.config["proxy_password"] proxy_settings.username = self.config["proxy_username"]
proxy_settings.hostname = self.config["proxy_server"] proxy_settings.password = self.config["proxy_password"]
proxy_settings.port = int(self.config["proxy_port"]) proxy_settings.hostname = self.config["proxy_server"]
proxy_settings.port = int(self.config["proxy_port"])
self.session.set_peer_proxy(proxy_settings) self.session.set_peer_proxy(proxy_settings)
self.session.set_web_seed_proxy(proxy_settings) self.session.set_web_seed_proxy(proxy_settings)
self.session.set_tracker_proxy(proxy_settings) self.session.set_tracker_proxy(proxy_settings)