From 04fb6de5e2108799e47a081e5331d932fcf53109 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Tue, 22 Feb 2011 11:59:19 -0800 Subject: Switching Interfaces to be instances They were previously classes, which made a lot of things stupider than they needed to be. This will likely involve some porting, but not much. Signed-off-by: Luke Kanies --- lib/puppet/application/interface_base.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/puppet/application/interface_base.rb') diff --git a/lib/puppet/application/interface_base.rb b/lib/puppet/application/interface_base.rb index 1dd1f76c2..9a6c8d9ec 100644 --- a/lib/puppet/application/interface_base.rb +++ b/lib/puppet/application/interface_base.rb @@ -68,8 +68,10 @@ class Puppet::Application::InterfaceBase < Puppet::Application @type = self.class.name.to_s.sub(/.+:/, '').downcase.to_sym - @interface = Puppet::Interface.interface(@type).new - @format ||= @interface.class.default_format || :pson + unless @interface = Puppet::Interface.interface(@type) + raise "Could not find interface '#{@type}'" + end + @format ||= @interface.default_format || :pson validate -- cgit