Requirements update for 9.0.0~b2
[openstack-build/neutron-build.git] / xenial / debian / patches / fix-no-attribute-code.patch
diff --git a/xenial/debian/patches/fix-no-attribute-code.patch b/xenial/debian/patches/fix-no-attribute-code.patch
new file mode 100644 (file)
index 0000000..37f0125
--- /dev/null
@@ -0,0 +1,56 @@
+--- neutron.orig/neutron/db/api.py     2016-08-18 17:21:13.507395437 +0200
++++ neutron/neutron/db/api.py  2016-08-18 17:22:04.214899405 +0200
+@@ -21,13 +21,11 @@
+ from oslo_db import api as oslo_db_api
+ from oslo_db import exception as db_exc
+ from oslo_db.sqlalchemy import enginefacade
+-from oslo_log import log as logging
+ from oslo_utils import excutils
+ import osprofiler.sqlalchemy
+ import six
+ import sqlalchemy
+ from sqlalchemy.orm import exc
+-import traceback
+ from neutron.common import exceptions
+ from neutron.common import profiler  # noqa
+@@ -45,7 +43,6 @@
+ MAX_RETRIES = 10
+-LOG = logging.getLogger(__name__)
+ def is_retriable(e):
+@@ -59,7 +56,7 @@
+ is_deadlock = moves.moved_function(is_retriable, 'is_deadlock', __name__,
+                                    message='use "is_retriable" instead',
+                                    version='newton', removal_version='ocata')
+-_retry_db_errors = oslo_db_api.wrap_db_retry(
++retry_db_errors = oslo_db_api.wrap_db_retry(
+     max_retries=MAX_RETRIES,
+     retry_interval=0.1,
+     inc_retry_interval=True,
+@@ -67,22 +64,6 @@
+ )
+-def retry_db_errors(f):
+-    """Log retriable exceptions before retry to help debugging."""
+-
+-    @_retry_db_errors
+-    @six.wraps(f)
+-    def wrapped(*args, **kwargs):
+-        try:
+-            return f(*args, **kwargs)
+-        except Exception as e:
+-            with excutils.save_and_reraise_exception():
+-                if is_retriable(e):
+-                    LOG.debug("Retry wrapper got retriable exception: %s",
+-                              traceback.format_exc())
+-    return wrapped
+-
+-
+ def reraise_as_retryrequest(f):
+     """Packs retriable exceptions into a RetryRequest."""