1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-03 10:06:17 +01:00

- _build_opener fail if the url is no apiurl

This commit is contained in:
Marcus Huewe 2010-08-26 14:14:23 +02:00
parent 2cb03b4efe
commit 2a18eff50b

View File

@ -2045,9 +2045,9 @@ def http_request(method, url, headers={}, data=None, file=None, timeout=100):
data = ''
req = urllib2.Request(url)
urllib2.install_opener(conf._build_opener(url))
api_host_options = {}
try:
urllib2.install_opener(conf._build_opener(url))
api_host_options = conf.get_apiurl_api_host_options(url)
for header, value in api_host_options['http_headers']:
req.add_header(header, value)