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:
parent
b10d40a7c9
commit
d86123c669
2 changed files with 2 additions and 0 deletions
|
@ -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 a new issue