remove unused reraise_as_retryrequest

The reraise_as_retryrequest decorator is already defined in
neutron_lib.db.utils and is no longer used in neutron [1].
This patch removes the dead code from neutron.

[1] http://codesearch.openstack.org/?q=reraise_as_retryrequest

Change-Id: Ie453dea132bc8b7f195b68c22a7ec150765102b2
This commit is contained in:
Boden R 2017-06-06 14:03:51 -06:00
parent fde6710515
commit 4ec751a800
1 changed files with 0 additions and 15 deletions

View File

@ -166,21 +166,6 @@ def retry_if_session_inactive(context_var_name='context'):
return decorator
def reraise_as_retryrequest(f):
"""Packs retriable exceptions into a RetryRequest."""
@six.wraps(f)
def wrapped(*args, **kwargs):
try:
return f(*args, **kwargs)
except Exception as e:
with excutils.save_and_reraise_exception() as ctx:
if is_retriable(e):
ctx.reraise = False
raise db_exc.RetryRequest(e)
return wrapped
def _is_nested_instance(e, etypes):
"""Check if exception or its inner excepts are an instance of etypes."""
if isinstance(e, etypes):