Skip to content

Commit

Permalink
catch ImportError rather than Exception when testing Boto3 imports (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tremble authored and mandar242 committed Oct 24, 2024
1 parent 1392b71 commit 040140b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugins/modules/ec2_transit_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,8 @@

try:
from botocore.exceptions import BotoCoreError, ClientError
except Exception:
pass
# handled by imported AnsibleAWSModule
except ImportError:
pass # handled by imported AnsibleAWSModule

from ansible_collections.amazon.aws.plugins.module_utils.core import AnsibleAWSModule
from time import sleep, time
Expand Down

0 comments on commit 040140b

Please sign in to comment.