Skip to content

Commit

Permalink
- raise more specific exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-h committed Oct 20, 2014
1 parent 67caa8b commit ca7ad96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osc/conf.py
Expand Up @@ -513,10 +513,10 @@ def retry_http_basic_auth(self, host, req, realm):
capath = i
break
if not cafile and not capath:
raise Exception('No CA certificates found')
raise oscerr.OscIOError(None, 'No CA certificates found')
ctx = oscssl.mySSLContext()
if ctx.load_verify_locations(capath=capath, cafile=cafile) != 1:
raise Exception('No CA certificates found')
raise oscerr.OscIOError(None, 'No CA certificates found')
opener = m2urllib2.build_opener(ctx, oscssl.myHTTPSHandler(ssl_context=ctx, appname='osc'), HTTPCookieProcessor(cookiejar), authhandler, proxyhandler)
else:
print("WARNING: SSL certificate checks disabled. Connection is insecure!\n", file=sys.stderr)
Expand Down

0 comments on commit ca7ad96

Please sign in to comment.