mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
ec2 inventory plugin: fix whitespace around connection validity test
This commit is contained in:
parent
6853553310
commit
57b72d242a
1 changed files with 4 additions and 4 deletions
|
@ -245,10 +245,10 @@ class Ec2Inventory(object):
|
||||||
else:
|
else:
|
||||||
conn = ec2.connect_to_region(region)
|
conn = ec2.connect_to_region(region)
|
||||||
|
|
||||||
# connect_to_region will fail "silently" by returning None if the region name is wrong or not supported
|
# connect_to_region will fail "silently" by returning None if the region name is wrong or not supported
|
||||||
if conn is None:
|
if conn is None:
|
||||||
print("region name: %s likely not supported, or AWS is down. connection to region failed." % region)
|
print("region name: %s likely not supported, or AWS is down. connection to region failed." % region)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
reservations = conn.get_all_instances()
|
reservations = conn.get_all_instances()
|
||||||
for reservation in reservations:
|
for reservation in reservations:
|
||||||
|
|
Loading…
Reference in a new issue