mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 00:03:10 +00:00
Merge pull request #3349 from tgerla/fixec2
ec2 inventory plugin: fix whitespace around connection validity test
This commit is contained in:
@@ -245,10 +245,10 @@ class Ec2Inventory(object):
|
||||
else:
|
||||
conn = ec2.connect_to_region(region)
|
||||
|
||||
# connect_to_region will fail "silently" by returning None if the region name is wrong or not supported
|
||||
if conn is None:
|
||||
print("region name: %s likely not supported, or AWS is down. connection to region failed." % region)
|
||||
sys.exit(1)
|
||||
# connect_to_region will fail "silently" by returning None if the region name is wrong or not supported
|
||||
if conn is None:
|
||||
print("region name: %s likely not supported, or AWS is down. connection to region failed." % region)
|
||||
sys.exit(1)
|
||||
|
||||
reservations = conn.get_all_instances()
|
||||
for reservation in reservations:
|
||||
|
||||
Reference in New Issue
Block a user