diff options
author | Andy Doan <andy.doan@linaro.org> | 2015-03-26 15:28:53 -0500 |
---|---|---|
committer | Andy Doan <andy.doan@linaro.org> | 2015-03-26 15:30:44 -0500 |
commit | dd04acb0b1c73299e7bbefa3eeb3bff6eb9d9023 (patch) | |
tree | 12cbc6220cf7ed89bc522a688e0188af72246de1 | |
parent | 361526e8c9d4810f2526f32ed7c792bf6c02c36a (diff) |
The get_all_snapshots was getting an array that had null values.
This filters out the null values
Change-Id: Ia070d4c1192fb01d3fd3c948480455da6b31a73f
-rw-r--r-- | linaro-ami/aws_controller.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linaro-ami/aws_controller.py b/linaro-ami/aws_controller.py index 29c77dc..d5037ee 100644 --- a/linaro-ami/aws_controller.py +++ b/linaro-ami/aws_controller.py @@ -104,7 +104,8 @@ class AwsController: # There doesn't seem to be timestamp associated with AMI, so iterate # over its associated snapshots, and find oldest. snapshot_ids = [bdm.snapshot_id - for bdm in image.block_device_mapping.values()] + for bdm in image.block_device_mapping.values() + if bdm.snapshot_id] snapshots = self._connection.get_all_snapshots(snapshot_ids) oldest = "Z" for s in snapshots: |