summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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