@@ -376,7 +376,7 @@ def get_nat_gateways(client, subnet_id=None, nat_gateway_id=None,
376
376
existing_gateways = DRY_RUN_GATEWAYS
377
377
err_msg = '{0} Retrieving gateways' .format (DRY_RUN_MSGS )
378
378
379
- except botocore .exceptions .ClientError , e :
379
+ except botocore .exceptions .ClientError as e :
380
380
err_msg = str (e )
381
381
382
382
return gateways_retrieved , err_msg , existing_gateways
@@ -457,7 +457,7 @@ def wait_for_status(client, wait_timeout, nat_gateway_id, status,
457
457
else :
458
458
time .sleep (polling_increment_secs )
459
459
460
- except botocore .exceptions .ClientError , e :
460
+ except botocore .exceptions .ClientError as e :
461
461
err_msg = str (e )
462
462
463
463
if not status_achieved :
@@ -578,7 +578,7 @@ def get_eip_allocation_id_by_address(client, eip_address, check_mode=False):
578
578
"EIP {0} does not exist" .format (eip_address )
579
579
)
580
580
581
- except botocore .exceptions .ClientError , e :
581
+ except botocore .exceptions .ClientError as e :
582
582
err_msg = str (e )
583
583
584
584
return allocation_id , err_msg
@@ -618,7 +618,7 @@ def allocate_eip_address(client, check_mode=False):
618
618
ip_allocated = True
619
619
err_msg = 'eipalloc id {0} created' .format (new_eip )
620
620
621
- except botocore .exceptions .ClientError , e :
621
+ except botocore .exceptions .ClientError as e :
622
622
err_msg = str (e )
623
623
624
624
return ip_allocated , err_msg , new_eip
@@ -1022,7 +1022,7 @@ def main():
1022
1022
region = region , endpoint = ec2_url , ** aws_connect_kwargs
1023
1023
)
1024
1024
)
1025
- except botocore .exceptions .ClientError , e :
1025
+ except botocore .exceptions .ClientError as e :
1026
1026
module .fail_json (msg = "Boto3 Client Error - " + str (e .msg ))
1027
1027
1028
1028
changed = False
0 commit comments