diff options
Diffstat (limited to 'oslo/db/sqlalchemy/exc_filters.py')
-rw-r--r-- | oslo/db/sqlalchemy/exc_filters.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/oslo/db/sqlalchemy/exc_filters.py b/oslo/db/sqlalchemy/exc_filters.py index f997237..f283f08 100644 --- a/oslo/db/sqlalchemy/exc_filters.py +++ b/oslo/db/sqlalchemy/exc_filters.py @@ -269,9 +269,8 @@ def _raise_operational_errors_directly_filter(operational_error, raise operational_error -# For the db2, the error code is -30081 since the db2 is still not ready -@filters("mysql", sqla_exc.OperationalError, r".*\((?:2002|2003|2006|2013)") -@filters("ibm_db_sa", sqla_exc.OperationalError, r".*(?:-30081)") +@filters("mysql", sqla_exc.OperationalError, r".*\(.*(?:2002|2003|2006|2013)") +@filters("ibm_db_sa", sqla_exc.OperationalError, r".*(?:30081)") def _is_db_connection_error(operational_error, match, engine_name, is_disconnect): """Detect the exception as indicating a recoverable error on connect.""" |