# Buggy code
def _configure(self):
    self.store = storage.get_driver(self.conf)
    self.index = indexer.get_driver(self.conf)
    self.index.connect()


# Traceback (SSLError)
2018-01-25 00:19:57.033 621506 ERROR cotyledon [-] Unhandled exception
2018-01-25 00:19:57.033 621506 ERROR cotyledon Traceback (most recent call last):
2018-01-25 00:19:57.033 621506 ERROR cotyledon   File "/usr/lib/python2.7/site-packages/cotyledon/__init__.py", line 52, in _exit_on_exception
2018-01-25 00:19:57.033 621506 ERROR cotyledon     yield
2018-01-25 00:19:57.033 621506 ERROR cotyledon   File "/usr/lib/python2.7/site-packages/cotyledon/__init__.py", line 130, in _run
2018-01-25 00:19:57.033 621506 ERROR cotyledon     self.run()
2018-01-25 00:19:57.033 621506 ERROR cotyledon   File "/usr/lib/python2.7/site-packages/gnocchi/cli.py", line 93, in run
2018-01-25 00:19:57.033 621506 ERROR cotyledon     self._configure()
2018-01-25 00:19:57.033 621506 ERROR cotyledon   File "/usr/lib/python2.7/site-packages/retrying.py", line 68, in wrapped_f
2018-01-25 00:19:57.033 621506 ERROR cotyledon     return Retrying(*dargs, **dkw).call(f, *args, **kw)
2018-01-25 00:19:57.033 621506 ERROR cotyledon   File "/usr/lib/python2.7/site-packages/retrying.py", line 223, in call
2018-01-25 00:19:57.033 621506 ERROR cotyledon     return attempt.get(self._wrap_exception)
2018-01-25 00:19:57.033 621506 ERROR cotyledon   File "/usr/lib/python2.7/site-packages/retrying.py", line 261, in get
2018-01-25 00:19:57.033 621506 ERROR cotyledon     six.reraise(self.value[0], self.value[1], self.value[2])
2018-01-25 00:19:57.033 621506 ERROR cotyledon   File "/usr/lib/python2.7/site-packages/retrying.py", line 217, in call
2018-01-25 00:19:57.033 621506 ERROR cotyledon     attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
2018-01-25 00:19:57.033 621506 ERROR cotyledon   File "/usr/lib/python2.7/site-packages/gnocchi/cli.py", line 88, in _configure
2018-01-25 00:19:57.033 621506 ERROR cotyledon     self.store = storage.get_driver(self.conf)
2018-01-25 00:19:57.033 621506 ERROR cotyledon   File "/usr/lib/python2.7/site-packages/gnocchi/storage/__init__.py", line 164, in get_driver
2018-01-25 00:19:57.033 621506 ERROR cotyledon     return get_driver_class(conf)(conf.storage)
2018-01-25 00:19:57.033 621506 ERROR cotyledon   File "/usr/lib/python2.7/site-packages/gnocchi/storage/swift.py", line 90, in __init__
2018-01-25 00:19:57.033 621506 ERROR cotyledon     self.swift.put_container(self.MEASURE_PREFIX)
2018-01-25 00:19:57.033 621506 ERROR cotyledon   File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 1728, in put_container
2018-01-25 00:19:57.033 621506 ERROR cotyledon     query_string=query_string)
2018-01-25 00:19:57.033 621506 ERROR cotyledon   File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 1647, in _retry
2018-01-25 00:19:57.033 621506 ERROR cotyledon     service_token=self.service_token, **kwargs)
2018-01-25 00:19:57.033 621506 ERROR cotyledon   File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 996, in put_container
2018-01-25 00:19:57.033 621506 ERROR cotyledon     conn.request(method, path, '', headers)
2018-01-25 00:19:57.033 621506 ERROR cotyledon   File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 437, in request
2018-01-25 00:19:57.033 621506 ERROR cotyledon     files=files, **self.requests_args)
2018-01-25 00:19:57.033 621506 ERROR cotyledon   File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 420, in _request
2018-01-25 00:19:57.033 621506 ERROR cotyledon     return self.request_session.request(*arg, **kwarg)
2018-01-25 00:19:57.033 621506 ERROR cotyledon   File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 468, in request
2018-01-25 00:19:57.033 621506 ERROR cotyledon     resp = self.send(prep, **send_kwargs)
2018-01-25 00:19:57.033 621506 ERROR cotyledon   File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
2018-01-25 00:19:57.033 621506 ERROR cotyledon     r = adapter.send(request, **kwargs)
2018-01-25 00:19:57.033 621506 ERROR cotyledon   File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 433, in send
2018-01-25 00:19:57.033 621506 ERROR cotyledon     raise SSLError(e, request=request)
2018-01-25 00:19:57.033 621506 ERROR cotyledon SSLError: ("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",)
2018-01-25 00:19:57.033 621506 ERROR cotyledon

# Fixed code
def _configure(self):
    try:
        self.store = storage.get_driver(self.conf)
        self.index = indexer.get_driver(self.conf)
        self.index.connect()
    except Exception as e:
        raise utils.Retry(e)