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:
parent
a6c45edb2d
commit
e2322c6284
1 changed files with 3 additions and 3 deletions
|
@ -19,12 +19,12 @@ 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
|
||||
if data = connection.list_metrics(list_opts).body['ListMetricsResult']['Metrics'].first
|
||||
new(data)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue