mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-03 18:16:17 +01:00
- _build_opener fail if the url is no apiurl
This commit is contained in:
parent
2cb03b4efe
commit
2a18eff50b
@ -2045,9 +2045,9 @@ def http_request(method, url, headers={}, data=None, file=None, timeout=100):
|
|||||||
data = ''
|
data = ''
|
||||||
|
|
||||||
req = urllib2.Request(url)
|
req = urllib2.Request(url)
|
||||||
urllib2.install_opener(conf._build_opener(url))
|
|
||||||
api_host_options = {}
|
api_host_options = {}
|
||||||
try:
|
try:
|
||||||
|
urllib2.install_opener(conf._build_opener(url))
|
||||||
api_host_options = conf.get_apiurl_api_host_options(url)
|
api_host_options = conf.get_apiurl_api_host_options(url)
|
||||||
for header, value in api_host_options['http_headers']:
|
for header, value in api_host_options['http_headers']:
|
||||||
req.add_header(header, value)
|
req.add_header(header, value)
|
||||||
|
Loading…
Reference in New Issue
Block a user