Merge pull request #1585 from bpandola/fix-1569

Fix rds.describe_db_snapshots bugs
This commit is contained in:
Steve Pulec 2018-05-30 23:10:20 -04:00 committed by GitHub
commit 23b51c39a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View file

@ -726,10 +726,11 @@ class RDS2Backend(BaseBackend):
def describe_snapshots(self, db_instance_identifier, db_snapshot_identifier):
if db_instance_identifier:
db_instance_snapshots = []
for snapshot in self.snapshots.values():
if snapshot.database.db_instance_identifier == db_instance_identifier:
return [snapshot]
raise DBSnapshotNotFoundError()
db_instance_snapshots.append(snapshot)
return db_instance_snapshots
if db_snapshot_identifier:
if db_snapshot_identifier in self.snapshots: