added error handling for edge cases where there are no networks or ips
This commit is contained in:
parent
b10d40a7c9
commit
d86123c669
|
@ -11,6 +11,7 @@ module Fog
|
|||
|
||||
def all
|
||||
data = connection.get_ip_addresses(href).body[:IpAddresses][:IpAddress]
|
||||
data = data.nil? ? [] : data
|
||||
load(data)
|
||||
end
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ module Fog
|
|||
def all
|
||||
data = connection.get_networks(href).body
|
||||
data = data[:Networks] ? data[:Networks][:Network] : data[:Network]
|
||||
data = data.nil? ? [] : data
|
||||
load(data)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue