summaryrefslogtreecommitdiffstats
path: root/lib/puppet/client.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/client.rb')
-rw-r--r--lib/puppet/client.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/puppet/client.rb b/lib/puppet/client.rb
index 53a61920f..ac2ec420c 100644
--- a/lib/puppet/client.rb
+++ b/lib/puppet/client.rb
@@ -61,10 +61,14 @@ module Puppet
msg = "Could not connect to %s on port %s" % [@host, @port]
#Puppet.err msg
raise NetworkClientError, msg
- #rescue => detail
- # Puppet.err "Could not call %s.%s: %s" %
- # [namespace, method, detail.inspect]
- # raise NetworkClientError.new(detail.to_s)
+ rescue SocketError => detail
+ Puppet.err "Could not find server %s" % @puppetserver
+ exit(12)
+ rescue => detail
+ Puppet.err "Could not call %s.%s: %s" %
+ [namespace, method, detail.inspect]
+ #raise NetworkClientError.new(detail.to_s)
+ raise
end
}
}
@@ -96,6 +100,8 @@ module Puppet
hash[:Server] ||= "localhost"
hash[:Port] ||= Puppet[:masterport]
+ @puppetserver = hash[:Server]
+
super(
hash[:Server],
hash[:Path],