Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gem for ruby 1.8 assumes ruby.1.9 popen3 #98

Open
mcqueenorama opened this issue Dec 27, 2011 · 0 comments
Open

gem for ruby 1.8 assumes ruby.1.9 popen3 #98

mcqueenorama opened this issue Dec 27, 2011 · 0 comments

Comments

@mcqueenorama
Copy link

status = Open3.popen3(cmd) do |stdout, stdin, stderr, wait_thr|

pi = [pw[1], pr[0], pe[0]]
pw[1].sync = true
if defined? yield
  begin
    return yield(*pi)
  ensure
    pi.each{|p| p.close unless p.closed?}
  end
end

I'm not a ruby expert but it looks like the yield is give 3 vars, but pool_party assumes wait_thr is there as a 4th var in the passed block. I see the docs in 1.9's Open3:popen3 show 4 vars, but this 1.8 lib does not supply wait_thr.

Ugly dump:

/usr/lib/ruby/gems/1.8/gems/poolparty-1.7.0.pre/bin/../lib/cloud_providers/connections.rb:157:in system_run': undefined methodvalue' for nil:NilClass (NoMethodError)
from /usr/lib/ruby/1.8/open3.rb:87:in popen3' from /usr/lib/ruby/gems/1.8/gems/poolparty-1.7.0.pre/bin/../lib/cloud_providers/connections.rb:136:insystem_run'
from /usr/lib/ruby/gems/1.8/gems/poolparty-1.7.0.pre/bin/../lib/cloud_providers/connections.rb:87:in ssh_cleanup_known_hosts!' from /usr/lib/ruby/gems/1.8/gems/poolparty-1.7.0.pre/bin/../lib/cloud_providers/connections.rb:85:ineach'
from /usr/lib/ruby/gems/1.8/gems/poolparty-1.7.0.pre/bin/../lib/cloud_providers/connections.rb:85:in ssh_cleanup_known_hosts!' from /usr/lib/ruby/gems/1.8/gems/poolparty-1.7.0.pre/bin/../lib/cloud_providers/ec2/ec2.rb:303:incleanup_ssh_known_hosts!'
from /usr/lib/ruby/gems/1.8/gems/poolparty-1.7.0.pre/bin/../lib/cloud_providers/ec2/ec2.rb:298:in each' from /usr/lib/ruby/gems/1.8/gems/poolparty-1.7.0.pre/bin/../lib/cloud_providers/ec2/ec2.rb:298:incleanup_ssh_known_hosts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant