Skip to content

Commit 6f50b89

Browse files
author
Rohan McGovern
authored
Merge pull request release-engineering#41 from JAVGan/snaps
AWS: Add a warning when the snapshot returns >1
2 parents 3fd0a81 + 683c82d commit 6f50b89

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

cloudimg/aws.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,12 @@ def get_snapshot_by_name(self, name):
372372

373373
if not snapshots:
374374
return None
375+
elif len(snapshots) > 1:
376+
snaps = [x['SnapshotId'] for x in snapshots]
377+
log.warning(
378+
"Filtered more than one snapshot: %s",
379+
", ".join(snaps),
380+
)
375381

376382
return self.ec2.Snapshot(snapshots[0]['SnapshotId'])
377383

0 commit comments

Comments
 (0)