Skip to content

Commit

Permalink
module_utils/waiters: adjust location of RetryingBotoClientWrapper
Browse files Browse the repository at this point in the history
`RetryingBotoClientWrapper` should now be loaded from
`ansible_collections.amazon.aws.plugins.module_utils.retries`.

See: ansible-collections/amazon.aws#1230
  • Loading branch information
goneri committed Dec 7, 2022
1 parent de6a071 commit ab51d64
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions plugins/module_utils/waiters.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@
except ImportError:
pass # caught by HAS_BOTO3

from ansible_collections.amazon.aws.plugins.module_utils.modules import (
_RetryingBotoClientWrapper,
)
try:
# See: https://github.com/ansible-collections/amazon.aws/pull/1230
from ansible_collections.amazon.aws.plugins.module_utils.retries import (
RetryingBotoClientWrapper,
)
except ImportError:
from ansible_collections.amazon.aws.plugins.module_utils.modules import (
_RetryingBotoClientWrapper,
)


cloudcontrolapi_data = {
Expand Down Expand Up @@ -94,7 +100,7 @@ def cloudcontrolapi_model(name):


def get_waiter(client, waiter_name):
if isinstance(client, _RetryingBotoClientWrapper):
if isinstance(client, RetryingBotoClientWrapper):
return get_waiter(client.client, waiter_name)
try:
return waiters_by_name[(client.__class__.__name__, waiter_name)](client)
Expand Down

0 comments on commit ab51d64

Please sign in to comment.