summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-12-28 00:08:07 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-12-28 00:08:07 +0000
commit883c64aaa0c0a81fa299424dec4a61f73c910820 (patch)
treed9f2596c7ad2366138cd9a0317b1ea3f2c96d082 /lib/puppet/parser
parent65e76e837654671e51c4ae3cb132452d23a83cef (diff)
downloadpuppet-883c64aaa0c0a81fa299424dec4a61f73c910820.tar.gz
puppet-883c64aaa0c0a81fa299424dec4a61f73c910820.tar.xz
puppet-883c64aaa0c0a81fa299424dec4a61f73c910820.zip
A couple of small bug-fixes
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1976 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/collector.rb6
-rw-r--r--lib/puppet/parser/interpreter.rb10
-rw-r--r--lib/puppet/parser/scope.rb2
3 files changed, 6 insertions, 12 deletions
diff --git a/lib/puppet/parser/collector.rb b/lib/puppet/parser/collector.rb
index bd0496cf9..fa7a41589 100644
--- a/lib/puppet/parser/collector.rb
+++ b/lib/puppet/parser/collector.rb
@@ -88,9 +88,9 @@ class Puppet::Parser::Collector
# and then delete this object from the list of collections to evaluate.
def evaluate
if self.resources
- # We don't want to get rid of the collection unless it actually finds something,
- # so that the collection will keep trying until all of the definitions are
- # evaluated.
+ # We don't want to get rid of the collection unless it actually
+ # finds something, so that the collection will keep trying until
+ # all of the definitions are evaluated.
unless objects = collect_resources
return
end
diff --git a/lib/puppet/parser/interpreter.rb b/lib/puppet/parser/interpreter.rb
index e32af9ed7..6c1c27926 100644
--- a/lib/puppet/parser/interpreter.rb
+++ b/lib/puppet/parser/interpreter.rb
@@ -685,15 +685,14 @@ class Puppet::Parser::Interpreter
# Connect to the LDAP Server
def setup_ldap
self.class.ldap = nil
- begin
- require 'ldap'
- rescue LoadError
+ unless Puppet.features.ldap?
Puppet.notice(
"Could not set up LDAP Connection: Missing ruby/ldap libraries"
)
@ldap = nil
return
end
+
begin
@ldap = self.class.ldap()
rescue => detail
@@ -809,11 +808,6 @@ class Puppet::Parser::Interpreter
Puppet.err "Could not store configs: %s" % detail.to_s
end
end
-
- # Now that we've stored everything, we need to strip out
- # the collectable objects so that they are not sent on
- # to the host
- #hash[:objects].collectstrip!
end
end
diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb
index 02fd72b0d..23542b6c9 100644
--- a/lib/puppet/parser/scope.rb
+++ b/lib/puppet/parser/scope.rb
@@ -189,7 +189,7 @@ class Puppet::Parser::Scope
def findresource(string, name = nil)
if name
- string = "%s[%s]" % [string, name]
+ string = "%s[%s]" % [string.capitalize, name]
end
@definedtable[string]