Skip to content

Commit

Permalink
ensure we have non-nil data, fixes ddollar#111
Browse files Browse the repository at this point in the history
  • Loading branch information
ddollar committed Jan 23, 2012
1 parent e0d84a5 commit 0b1daf1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/foreman/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ def watch_for_output
loop do
rs, ws = IO.select(readers.values, [], [], 1)
(rs || []).each do |r|
ps, message = r.gets.split(",", 2)
data = r.gets
next unless data
ps, message = data.split(",", 2)
color = colors[ps.split(".").first]
info message, ps, color
end
Expand Down

0 comments on commit 0b1daf1

Please sign in to comment.