Skip to content

Commit

Permalink
Fix exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
velp committed Feb 25, 2025
1 parent da20033 commit 10bc79a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions octavia_f5/utils/cert_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from oslo_context import context as oslo_context
from stevedore import driver as stevedore_driver

from octavia.common import exceptions as octavia_exc
from octavia.common.tls_utils import cert_parser
from octavia_f5.common import constants
from octavia_f5.restclient.as3objects import certificate as m_cert
Expand All @@ -42,8 +43,7 @@ def __init__(self):

@tenacity.retry(
retry=tenacity.retry_if_exception_type(
(urllib_exc.NewConnectionError,
requests_exc.ConnectionError)),
(octavia_exc.CertificateRetrievalException)),
wait=tenacity.wait_incrementing(
RETRY_INITIAL_DELAY, RETRY_BACKOFF, RETRY_MAX),
stop=tenacity.stop_after_attempt(RETRY_ATTEMPTS))
Expand Down Expand Up @@ -84,8 +84,7 @@ def get_certificates(self, obj, context=None):

@tenacity.retry(
retry=tenacity.retry_if_exception_type(
(urllib_exc.NewConnectionError,
requests_exc.ConnectionError)),
(octavia_exc.CertificateRetrievalException)),
wait=tenacity.wait_incrementing(
RETRY_INITIAL_DELAY, RETRY_BACKOFF, RETRY_MAX),
stop=tenacity.stop_after_attempt(RETRY_ATTEMPTS))
Expand Down

0 comments on commit 10bc79a

Please sign in to comment.