1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[aws|autoscaling] metrics#get should return nil when not found

This commit is contained in:
geemus 2011-07-21 16:45:50 -05:00
parent a6c45edb2d
commit e2322c6284

View file

@ -19,11 +19,11 @@ module Fog
dimensions_array = dimensions.collect do |name, value|
{'Name' => name, 'Value' => value}
end
puts dimensions_array.inspect
# list_opts.merge!('Dimensions' => dimensions_array)
end
data = connection.list_metrics(list_opts).body['ListMetricsResult']['Metrics'].first
new(data)
if data = connection.list_metrics(list_opts).body['ListMetricsResult']['Metrics'].first
new(data)
end
end
end