From 01a91d83e39ff0777f3547e1ba3cc05ca3ac1eab Mon Sep 17 00:00:00 2001 From: Javier Ros Date: Mon, 29 Jun 2015 08:39:02 +0000 Subject: [PATCH] Problem when there were RIs for Windows with SQL --- lib/aws_common.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/aws_common.rb b/lib/aws_common.rb index fe1d58d..74afb5b 100644 --- a/lib/aws_common.rb +++ b/lib/aws_common.rb @@ -142,7 +142,7 @@ def get_reserved_instances(regions, account_ids) elsif ri.product_description.include?("Windows") && !ri.product_description.include?("SQL Server") instances[ri.reserved_instances_id][:platform] = 'Windows' else - instances[ri.reserved_instances_id] = nil + instances.delete(ri.reserved_instances_id) end end end @@ -180,7 +180,7 @@ def get_mock_reserved_instances elsif row[7].include?("Windows") && !row[7].include?("SQL Server") instances[row[1]][:platform] = 'Windows' else - instances[row[1]] = nil + instances.delete(row[1]) end end end