Merge pull request #2473 from coreos-inc/certs-fixes
Fixes and improvements around custom certificate handling
This commit is contained in:
commit
65a17dc155
10 changed files with 86 additions and 41 deletions
|
@ -166,15 +166,18 @@ class SecurityScannerAPI(object):
|
|||
"""
|
||||
try:
|
||||
return self._call('GET', _API_METHOD_PING)
|
||||
except requests.exceptions.Timeout:
|
||||
except requests.exceptions.Timeout as tie:
|
||||
logger.exception('Timeout when trying to connect to security scanner endpoint')
|
||||
raise Exception('Timeout when trying to connect to security scanner endpoint')
|
||||
except requests.exceptions.ConnectionError:
|
||||
msg = 'Timeout when trying to connect to security scanner endpoint: %s' % tie.message
|
||||
raise Exception(msg)
|
||||
except requests.exceptions.ConnectionError as ce:
|
||||
logger.exception('Connection error when trying to connect to security scanner endpoint')
|
||||
raise Exception('Connection error when trying to connect to security scanner endpoint')
|
||||
except (requests.exceptions.RequestException, ValueError):
|
||||
msg = 'Connection error when trying to connect to security scanner endpoint: %s' % ce.message
|
||||
raise Exception(msg)
|
||||
except (requests.exceptions.RequestException, ValueError) as ve:
|
||||
logger.exception('Exception when trying to connect to security scanner endpoint')
|
||||
raise Exception('Exception when trying to connect to security scanner endpoint')
|
||||
msg = 'Exception when trying to connect to security scanner endpoint: %s' % ve
|
||||
raise Exception(msg)
|
||||
|
||||
def delete_layer(self, layer):
|
||||
""" Calls DELETE on the given layer in the security scanner, removing it from
|
||||
|
|
Reference in a new issue