From 2a18eff50bb948b4e1e6016481ff9a11565a2b92 Mon Sep 17 00:00:00 2001 From: Marcus Huewe Date: Thu, 26 Aug 2010 14:14:23 +0200 Subject: [PATCH] - _build_opener fail if the url is no apiurl --- osc/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osc/core.py b/osc/core.py index d8615fb2..78f7293c 100644 --- a/osc/core.py +++ b/osc/core.py @@ -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)