[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 2.6.5rc1-120-g2247c80
Paul Berry
paul at puppetlabs.com
Mon Feb 7 06:40:14 UTC 2011
The following commit has been merged in the upstream branch:
commit 2b9b7a5f7fe4b673f0d1fba9fb523cc0e2e34fa5
Author: Paul Berry <paul at puppetlabs.com>
Date: Mon Jan 10 14:17:14 2011 -0800
(#5838) Refactored error handling logic into find_in_cache.
Moved the error handling logic surrounding the call to
Puppet::Indirector::Indirection#find_in_cache() into the
find_in_cache() method itself, so that won't need to be duplicated
when find_in_cache() is called from elsewhere.
Paired-with: Jesse Wolfe <jesse at puppetlabs.com>
diff --git a/lib/puppet/indirector/indirection.rb b/lib/puppet/indirector/indirection.rb
index a010c4e..4341f7c 100644
--- a/lib/puppet/indirector/indirection.rb
+++ b/lib/puppet/indirector/indirection.rb
@@ -180,13 +180,8 @@ class Puppet::Indirector::Indirection
request = request(:find, key, *args)
terminus = prepare(request)
- begin
- if result = find_in_cache(request)
- return result
- end
- rescue => detail
- puts detail.backtrace if Puppet[:trace]
- Puppet.err "Cached #{self.name} for #{request.key} failed: #{detail}"
+ if result = find_in_cache(request)
+ return result
end
# Otherwise, return the result from the terminus, caching if appropriate.
@@ -213,6 +208,10 @@ class Puppet::Indirector::Indirection
Puppet.debug "Using cached #{self.name} for #{request.key}"
cached
+ rescue => detail
+ puts detail.backtrace if Puppet[:trace]
+ Puppet.err "Cached #{self.name} for #{request.key} failed: #{detail}"
+ nil
end
# Remove something via the terminus.
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list