Skip to content

Commit ab62c64

Browse files
committed
updated catch statement to pass test (as e)
1 parent 8af1063 commit ab62c64

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cloud/amazon/ec2_vpc_nat_gateway.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def get_nat_gateways(client, subnet_id=None, nat_gateway_id=None,
376376
existing_gateways = DRY_RUN_GATEWAYS
377377
err_msg = '{0} Retrieving gateways'.format(DRY_RUN_MSGS)
378378

379-
except botocore.exceptions.ClientError, e:
379+
except botocore.exceptions.ClientError as e:
380380
err_msg = str(e)
381381

382382
return gateways_retrieved, err_msg, existing_gateways
@@ -457,7 +457,7 @@ def wait_for_status(client, wait_timeout, nat_gateway_id, status,
457457
else:
458458
time.sleep(polling_increment_secs)
459459

460-
except botocore.exceptions.ClientError, e:
460+
except botocore.exceptions.ClientError as e:
461461
err_msg = str(e)
462462

463463
if not status_achieved:
@@ -578,7 +578,7 @@ def get_eip_allocation_id_by_address(client, eip_address, check_mode=False):
578578
"EIP {0} does not exist".format(eip_address)
579579
)
580580

581-
except botocore.exceptions.ClientError, e:
581+
except botocore.exceptions.ClientError as e:
582582
err_msg = str(e)
583583

584584
return allocation_id, err_msg
@@ -618,7 +618,7 @@ def allocate_eip_address(client, check_mode=False):
618618
ip_allocated = True
619619
err_msg = 'eipalloc id {0} created'.format(new_eip)
620620

621-
except botocore.exceptions.ClientError, e:
621+
except botocore.exceptions.ClientError as e:
622622
err_msg = str(e)
623623

624624
return ip_allocated, err_msg, new_eip
@@ -1022,7 +1022,7 @@ def main():
10221022
region=region, endpoint=ec2_url, **aws_connect_kwargs
10231023
)
10241024
)
1025-
except botocore.exceptions.ClientError, e:
1025+
except botocore.exceptions.ClientError as e:
10261026
module.fail_json(msg="Boto3 Client Error - " + str(e.msg))
10271027

10281028
changed = False

0 commit comments

Comments
 (0)