1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-11 11:55:03 -05:00

Merge pull request #429 from pmaciocia/fix_proxy_390

Fix for #390
This commit is contained in:
Nils 2014-05-07 14:49:44 +02:00
commit 3984965a1c

View File

@ -165,7 +165,7 @@ def sanitizeFileName(name):
return name return name
def getURL(url, post_data=None, headers=None, params=None, timeout=30, json=False): def getURL(url, post_data=None, headers=None, params=None, timeout=30, json=False, use_proxy=False):
""" """
Returns a byte-string retrieved from the url provider. Returns a byte-string retrieved from the url provider.
""" """
@ -187,7 +187,9 @@ def getURL(url, post_data=None, headers=None, params=None, timeout=30, json=Fals
it = iter(req_headers) it = iter(req_headers)
if sickbeard.PROXY_SETTING:
if use_proxy and sickbeard.PROXY_SETTING:
logger.log("Using proxy for url: " + url, logger.DEBUG)
proxies = { proxies = {
"http": sickbeard.PROXY_SETTING, "http": sickbeard.PROXY_SETTING,
"https": sickbeard.PROXY_SETTING, "https": sickbeard.PROXY_SETTING,