RnP: Fix use of deprecated IO#lines in logging functions

This commit is contained in:
Calvin Walton 2016-08-02 10:58:42 -04:00
parent 2b8d7a9858
commit d4e7605f42

View File

@ -126,7 +126,7 @@ module BigBlueButton
def self.exec_ret(*command) def self.exec_ret(*command)
BigBlueButton.logger.info "Executing: #{command.join(' ')}" BigBlueButton.logger.info "Executing: #{command.join(' ')}"
IO.popen([*command, :err => [:child, :out]]) do |io| IO.popen([*command, :err => [:child, :out]]) do |io|
io.lines.each do |line| io.each_line do |line|
BigBlueButton.logger.info line.chomp BigBlueButton.logger.info line.chomp
end end
end end
@ -140,7 +140,7 @@ module BigBlueButton
IO.pipe do |r, w| IO.pipe do |r, w|
pid = spawn(*command, :out => outio, :err => w) pid = spawn(*command, :out => outio, :err => w)
w.close w.close
r.lines.each do |line| r.each_line do |line|
BigBlueButton.logger.info line.chomp BigBlueButton.logger.info line.chomp
end end
Process.waitpid(pid) Process.waitpid(pid)