0001-misc-add-a-REQUESTS_PROXIES-settings-for-requests-ca.patch
| wcs/qommon/misc.py | ||
|---|---|---|
|
except ImportError:
|
||
|
Image = None
|
||
|
from django.conf import settings
|
||
|
from django.utils import datetime_safe
|
||
|
from quixote import get_publisher, get_response, get_request
|
||
| ... | ... | |
|
try:
|
||
|
response = requests.request(method, url, headers=headers, data=body,
|
||
|
timeout=timeout, cert=cert_file)
|
||
|
timeout=timeout, cert=cert_file, proxies=settings.REQUESTS_PROXIES)
|
||
|
except requests.Timeout:
|
||
|
raise ConnectionError('connection timed out while fetching the page')
|
||
|
except requests.RequestException as err:
|
||
| wcs/settings.py | ||
|---|---|---|
|
WCS_LEGACY_CONFIG_FILE = None
|
||
|
# proxies=REQUESTS_PROXIES is used in python-requests call
|
||
|
# http://docs.python-requests.org/en/master/user/advanced/?highlight=proxy#proxies
|
||
|
REQUESTS_PROXIES = None
|
||
|
local_settings_file = os.environ.get('WCS_SETTINGS_FILE',
|
||
|
os.path.join(os.path.dirname(__file__), 'local_settings.py'))
|
||
|
if os.path.exists(local_settings_file):
|
||