summaryrefslogtreecommitdiff
path: root/lib/oxidized/config
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/config')
-rw-r--r--lib/oxidized/config/vars.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/oxidized/config/vars.rb b/lib/oxidized/config/vars.rb
index bc94049..0d6aaa7 100644
--- a/lib/oxidized/config/vars.rb
+++ b/lib/oxidized/config/vars.rb
@@ -2,9 +2,9 @@ module Oxidized::Config::Vars
# convenience method for accessing node, group or global level user variables
# nil values will be ignored
def vars name
- r = @node.vars[name]
- r ||= CFG.groups[@node.group].vars[name.to_s] if CFG.groups.has_key?(@node.group)
- r ||= CFG.vars[name.to_s]
+ r = @node.vars[name] unless @node.vars.nil?
+ r ||= Oxidized::CFG.groups[@node.group].vars[name.to_s] if Oxidized::CFG.groups.has_key?(@node.group)
+ r ||= Oxidized::CFG.vars[name.to_s]
end
end