Skip to content

Commit

Permalink
Merge branch 'hotfix/0.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Dahlgren committed Apr 28, 2014
2 parents 384e000 + 0cdd3c2 commit 1076056
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion automated_ebs_snapshots/settings.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[general]
version: 0.2.0
version: 0.2.1
8 changes: 7 additions & 1 deletion automated_ebs_snapshots/snapshot_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import logging
import datetime

from boto.exception import EC2ResponseError

from automated_ebs_snapshots import volume_manager
from automated_ebs_snapshots.valid_intervals import VALID_INTERVALS

Expand Down Expand Up @@ -124,6 +126,10 @@ def _remove_old_snapshots(connection, volume):

for snapshot in snapshots:
logger.info('Deleting snapshot {}'.format(snapshot.id))
snapshot.delete()
try:
snapshot.delete()
except EC2ResponseError as error:
logger.warning('Could not remove snapshot: {}'.format(
error.message))

logger.info('Done deleting snapshots')

0 comments on commit 1076056

Please sign in to comment.