summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJari Salo <jari.salo@tdc.fi>2014-08-25 18:54:45 +0300
committerJari Salo <jari.salo@tdc.fi>2014-08-25 18:54:45 +0300
commit3a24cc5ba5af14bff128c512a039abbfe5266bfa (patch)
tree72114fd6ec797488c6687e4bb77ff279a92b4316 /lib
parentcae7076eeed2b3b5fcfecffde17bcb85d8013af2 (diff)
Return true if node_want is nil
- Otherwise all nodes can not be loaded.
Diffstat (limited to 'lib')
-rw-r--r--lib/oxidized/nodes.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/oxidized/nodes.rb b/lib/oxidized/nodes.rb
index 227f656..032118d 100644
--- a/lib/oxidized/nodes.rb
+++ b/lib/oxidized/nodes.rb
@@ -29,6 +29,7 @@ module Oxidized
end
def node_want? node_want, node
+ return true unless node_want
node_want_ip = (IPAddr.new(node_want) rescue false)
name_is_ip = (IPAddr.new(node[:name]) rescue false)
if name_is_ip and node_want_ip == node[:name]