1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-25 11:42:12 +01:00

Merge branch 'master' of git://gitorious.org/opensuse/osc

This commit is contained in:
Marcus Huewe 2010-03-07 22:44:34 +01:00
commit 76cfc033a9
2 changed files with 4 additions and 3 deletions

View File

@ -108,7 +108,7 @@ def run(prg):
return 1
except URLError, e:
print >>sys.stderr, 'Failed to reach a server:', e.reason
print >>sys.stderr, 'Failed to reach a server:\n', e.reason
return 1
except (oscerr.ConfigError, oscerr.NoConfigfile), e:

View File

@ -172,7 +172,7 @@ class myHTTPSHandler(M2Crypto.m2urllib2.HTTPSHandler):
def https_open(self, req):
host = req.get_host()
if not host:
raise URLError('no host given')
raise M2Crypto.m2urllib2.URLError('no host given: ' + req.get_full_url())
# Our change: Check to see if we're using a proxy.
# Then create an appropriate ssl-aware connection.
@ -199,7 +199,8 @@ class myHTTPSHandler(M2Crypto.m2urllib2.HTTPSHandler):
h.request(req.get_method(), req.get_full_url(), req.data, headers)
r = h.getresponse()
except socket.error, err: # XXX what error?
raise URLError(err)
err.filename = full_url
raise M2Crypto.m2urllib2.URLError(err)
# Pick apart the HTTPResponse object to get the addinfourl
# object initialized properly.