Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

Commit

Permalink
fixed bug in AWS destroy wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
mafrosis committed Feb 13, 2013
1 parent 48b9088 commit b1d9b99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion saltcloud/clouds/aws.py
Expand Up @@ -488,11 +488,12 @@ def destroy(name):
from saltcloud.libcloudfuncs import destroy as libcloudfuncs_destroy
location = get_location()
conn = get_conn(location=location)
libcloudfuncs_destroy = namespaced_function(libcloudfuncs_destroy, globals(), (conn,))
try:
libcloudfuncs_destroy(name, conn)
except Exception as e:
if e.message.startswith('OperationNotPermitted'):
log.warning('Failed: termination protection is enabled on {0}'.format(name))
log.info('Failed: termination protection is enabled on {0}'.format(name))
else:
raise e

Expand Down

0 comments on commit b1d9b99

Please sign in to comment.