summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-07-11 17:36:32 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-07-11 17:36:32 +0000
commita3849d713e44e6f3037f146990d9568e51cea13e (patch)
tree3c6a66e612b1232b4cc02b720966bc89b060b287
parent86a92de183232a986f0c53820576f364711477a6 (diff)
downloadpuppet-a3849d713e44e6f3037f146990d9568e51cea13e.tar.gz
puppet-a3849d713e44e6f3037f146990d9568e51cea13e.tar.xz
puppet-a3849d713e44e6f3037f146990d9568e51cea13e.zip
Fixing templating bug that can result in what looks like an infinite loop, and changing default timeout to 2 minutes instead of 30 seconds
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1385 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r--lib/puppet/networkclient.rb3
-rw-r--r--lib/puppet/parser/scope.rb8
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/puppet/networkclient.rb b/lib/puppet/networkclient.rb
index d6975c5c2..fa5a21957 100644
--- a/lib/puppet/networkclient.rb
+++ b/lib/puppet/networkclient.rb
@@ -136,7 +136,8 @@ module Puppet
nil, # proxy_port
nil, # user
nil, # password
- true # use_ssl
+ true, # use_ssl
+ 120 # a two minute timeout, instead of 30 seconds
)
if hash[:Certificate]
diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb
index 6e895afa1..747645cbc 100644
--- a/lib/puppet/parser/scope.rb
+++ b/lib/puppet/parser/scope.rb
@@ -14,6 +14,7 @@ module Puppet::Parser
# the scope objects.
class TemplateWrapper
attr_accessor :scope, :file
+ Puppet::Util.logmethods(self)
def initialize(scope, file)
@scope = scope
@@ -38,7 +39,8 @@ module Puppet::Parser
if value = @scope.lookupvar(name.to_s) and value != :undefined and value != ""
return value
else
- super
+ info "Could not find value for %s" % name
+ return ""
end
end
@@ -46,6 +48,10 @@ module Puppet::Parser
template = ERB.new(File.read(@file))
template.result(binding)
end
+
+ def to_s
+ "template[%s]" % @file
+ end
end
# This doesn't actually work right now.