Finish python3 syntax compilation fixing for core repo
This commit is contained in:
parent
c901b70a01
commit
53a22ce93a
1 changed files with 5 additions and 5 deletions
|
@ -239,7 +239,7 @@ def invoke_with_throttling_retries(function_ref, *argv):
|
||||||
try:
|
try:
|
||||||
retval=function_ref(*argv)
|
retval=function_ref(*argv)
|
||||||
return retval
|
return retval
|
||||||
except boto.exception.BotoServerError, e:
|
except boto.exception.BotoServerError as e:
|
||||||
if e.code != IGNORE_CODE or retries==MAX_RETRIES:
|
if e.code != IGNORE_CODE or retries==MAX_RETRIES:
|
||||||
raise e
|
raise e
|
||||||
time.sleep(5 * (2**retries))
|
time.sleep(5 * (2**retries))
|
||||||
|
@ -313,7 +313,7 @@ def main():
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cfn = connect_to_aws(boto.cloudformation, region, **aws_connect_kwargs)
|
cfn = connect_to_aws(boto.cloudformation, region, **aws_connect_kwargs)
|
||||||
except boto.exception.NoAuthHandlerFound, e:
|
except boto.exception.NoAuthHandlerFound as e:
|
||||||
module.fail_json(msg=str(e))
|
module.fail_json(msg=str(e))
|
||||||
update = False
|
update = False
|
||||||
result = {}
|
result = {}
|
||||||
|
@ -332,7 +332,7 @@ def main():
|
||||||
capabilities=['CAPABILITY_IAM'],
|
capabilities=['CAPABILITY_IAM'],
|
||||||
**kwargs)
|
**kwargs)
|
||||||
operation = 'CREATE'
|
operation = 'CREATE'
|
||||||
except Exception, err:
|
except Exception as err:
|
||||||
error_msg = boto_exception(err)
|
error_msg = boto_exception(err)
|
||||||
if 'AlreadyExistsException' in error_msg or 'already exists' in error_msg:
|
if 'AlreadyExistsException' in error_msg or 'already exists' in error_msg:
|
||||||
update = True
|
update = True
|
||||||
|
@ -354,7 +354,7 @@ def main():
|
||||||
template_url=template_url,
|
template_url=template_url,
|
||||||
capabilities=['CAPABILITY_IAM'])
|
capabilities=['CAPABILITY_IAM'])
|
||||||
operation = 'UPDATE'
|
operation = 'UPDATE'
|
||||||
except Exception, err:
|
except Exception as err:
|
||||||
error_msg = boto_exception(err)
|
error_msg = boto_exception(err)
|
||||||
if 'No updates are to be performed.' in error_msg:
|
if 'No updates are to be performed.' in error_msg:
|
||||||
result = dict(changed=False, output='Stack is already up-to-date.')
|
result = dict(changed=False, output='Stack is already up-to-date.')
|
||||||
|
@ -391,7 +391,7 @@ def main():
|
||||||
try:
|
try:
|
||||||
invoke_with_throttling_retries(cfn.describe_stacks,stack_name)
|
invoke_with_throttling_retries(cfn.describe_stacks,stack_name)
|
||||||
operation = 'DELETE'
|
operation = 'DELETE'
|
||||||
except Exception, err:
|
except Exception as err:
|
||||||
error_msg = boto_exception(err)
|
error_msg = boto_exception(err)
|
||||||
if 'Stack:%s does not exist' % stack_name in error_msg:
|
if 'Stack:%s does not exist' % stack_name in error_msg:
|
||||||
result = dict(changed=False, output='Stack not found.')
|
result = dict(changed=False, output='Stack not found.')
|
||||||
|
|
Loading…
Reference in a new issue