summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/network')
-rw-r--r--lib/puppet/network/format_handler.rb4
-rw-r--r--lib/puppet/network/xmlrpc/client.rb4
2 files changed, 2 insertions, 6 deletions
diff --git a/lib/puppet/network/format_handler.rb b/lib/puppet/network/format_handler.rb
index 70e33a054..b5817d544 100644
--- a/lib/puppet/network/format_handler.rb
+++ b/lib/puppet/network/format_handler.rb
@@ -9,14 +9,12 @@ module Puppet::Network::FormatHandler
attr_reader :format
def protect(method, args)
- begin
Puppet::Network::FormatHandler.format(format).send(method, *args)
- rescue => details
+ rescue => details
direction = method.to_s.include?("intern") ? "from" : "to"
error = FormatError.new("Could not #{method} #{direction} #{format}: #{details}")
error.set_backtrace(details.backtrace)
raise error
- end
end
def initialize(format)
diff --git a/lib/puppet/network/xmlrpc/client.rb b/lib/puppet/network/xmlrpc/client.rb
index e19275759..2bf30e729 100644
--- a/lib/puppet/network/xmlrpc/client.rb
+++ b/lib/puppet/network/xmlrpc/client.rb
@@ -196,11 +196,9 @@ module Puppet::Network
end
def start
- begin
@http.start unless @http.started?
- rescue => detail
+ rescue => detail
Puppet.err "Could not connect to server: #{detail}"
- end
end
def local