Permalink
Browse files

Cleanup after talking to @dpiddy

  • Loading branch information...
1 parent 581e2ed commit 2954b19b12685faa80bcb2468f3940a11ee43caa @freeformz committed May 23, 2012
Showing with 3 additions and 6 deletions.
  1. +3 −6 lib/fog/compute/models/server.rb
@@ -33,12 +33,9 @@ def ssh(commands, options={})
end
def sshable?
- begin
- Timeout::timeout(8) { ssh 'pwd' }
- rescue Errno::ECONNREFUSED, Net::SSH::AuthenticationFailed, Timeout::Error
- return false
- end
- return true
+ ready? && !public_ip_address.nil? && !!Timeout::timeout(8) { ssh 'pwd' }
+ rescue SystemCallError, Net::SSH::AuthenticationFailed, Timeout::Error
+ false
end
end

0 comments on commit 2954b19

Please sign in to comment.