Skip to content

Commit

Permalink
Avoid NPEs
Browse files Browse the repository at this point in the history
  • Loading branch information
gousiosg committed Feb 4, 2020
1 parent 5e368c6 commit 9709ae7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/ght-log-influx
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ ARGF.each do |line|
next if logs.empty?

logs.each do |p|
puts p
influx.write_point(p[:series], p.select{|x| x != :series})

unless p[:series].nil?
influx.write_point(p[:series], p.select{|x| x != :series})
end
end
rescue StandardError => e
puts e.backtrace
Expand Down

0 comments on commit 9709ae7

Please sign in to comment.