summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorRick Bradley <rick@rickbradley.com>2007-10-16 15:56:03 -0500
committerRick Bradley <rick@rickbradley.com>2007-10-16 15:56:03 -0500
commitce349683b76ab9d21f4d89e2ec818c0755848a1d (patch)
tree9d57f4d6afdd960c163673bebec21c5aab2ae382 /lib/puppet
parent6cd0f371065da901d8cc3143d8859a389ca87582 (diff)
downloadpuppet-ce349683b76ab9d21f4d89e2ec818c0755848a1d.tar.gz
puppet-ce349683b76ab9d21f4d89e2ec818c0755848a1d.tar.xz
puppet-ce349683b76ab9d21f4d89e2ec818c0755848a1d.zip
Make the actual runtime be more robust when mongrel is not installed.
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/network/http.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/puppet/network/http.rb b/lib/puppet/network/http.rb
index 044310d8e..062c67c71 100644
--- a/lib/puppet/network/http.rb
+++ b/lib/puppet/network/http.rb
@@ -1,7 +1,10 @@
class Puppet::Network::HTTP
def self.server_class_by_type(kind)
return Puppet::Network::HTTP::WEBrick if kind.to_sym == :webrick
- return Puppet::Network::HTTP::Mongrel if kind.to_sym == :mongrel
+ if kind.to_sym == :mongrel
+ raise ArgumentError, "Mongrel is not installed on this platform" unless Puppet.features.mongrel?
+ return Puppet::Network::HTTP::Mongrel
+ end
raise ArgumentError, "Unknown HTTP server name [#{kind}]"
end
end