diff options
| author | Luke Kanies <luke@puppetlabs.com> | 2011-02-22 11:59:19 -0800 |
|---|---|---|
| committer | Luke Kanies <luke@puppetlabs.com> | 2011-02-22 11:59:19 -0800 |
| commit | 04fb6de5e2108799e47a081e5331d932fcf53109 (patch) | |
| tree | 5df833d9972067992d361accca4729c3073c1fc4 /lib/puppet/application | |
| parent | 0cbdbce0f518d43f0d0160a58dd5ec7253a5af87 (diff) | |
| download | puppet-04fb6de5e2108799e47a081e5331d932fcf53109.tar.gz puppet-04fb6de5e2108799e47a081e5331d932fcf53109.tar.xz puppet-04fb6de5e2108799e47a081e5331d932fcf53109.zip | |
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 <luke@puppetlabs.com>
Diffstat (limited to 'lib/puppet/application')
| -rw-r--r-- | lib/puppet/application/interface_base.rb | 6 |
1 files changed, 4 insertions, 2 deletions
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 |
