This is a different fix than the one proposed by Stefan Schulte, based
on Luke comments.

Signed-off-by: Brice Figureau <[email protected]>
---
 lib/puppet/util/network_device/transport/ssh.rb |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/puppet/util/network_device/transport/ssh.rb 
b/lib/puppet/util/network_device/transport/ssh.rb
index bf0e719..3d79765 100644
--- a/lib/puppet/util/network_device/transport/ssh.rb
+++ b/lib/puppet/util/network_device/transport/ssh.rb
@@ -2,7 +2,6 @@
 require 'puppet/util/network_device'
 require 'puppet/util/network_device/transport'
 require 'puppet/util/network_device/transport/base'
-require 'net/ssh'
 
 # This is an adaptation/simplification of gem net-ssh-telnet, which aims to 
have
 # a sane interface to Net::SSH. Credits goes to net-ssh-telnet authors
@@ -12,6 +11,9 @@ class Puppet::Util::NetworkDevice::Transport::Ssh < 
Puppet::Util::NetworkDevice:
 
   def initialize
     super
+    unless Puppet.features.ssh?
+      raise 'Connecting with ssh to a network device requires the \'net/ssh\' 
ruby library'
+    end
   end
 
   def handles_login?
-- 
1.7.5.1

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to