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

added error handling for edge cases where there are no networks or ips

This commit is contained in:
Eugene Howe 2012-08-09 13:24:21 -04:00
parent b10d40a7c9
commit d86123c669
2 changed files with 2 additions and 0 deletions

View file

@ -11,6 +11,7 @@ module Fog
def all
data = connection.get_ip_addresses(href).body[:IpAddresses][:IpAddress]
data = data.nil? ? [] : data
load(data)
end

View file

@ -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