From: Alexander Moisseev Date: Wed, 7 Dec 2016 16:40:53 +0000 (+0300) Subject: [Minor] rspamd_stats: fix parsing of lines with `NaN` score X-Git-Tag: 1.5.0~648^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e53908532ab8a6ba470393d171fe0ee41ee6aaaf;p=rspamd.git [Minor] rspamd_stats: fix parsing of lines with `NaN` score --- diff --git a/utils/rspamd_stats.pl b/utils/rspamd_stats.pl index 1e8e7a158..e1618d14d 100644 --- a/utils/rspamd_stats.pl +++ b/utils/rspamd_stats.pl @@ -192,7 +192,7 @@ sub ProcessLog { if (/^.*rspamd_task_write_log.*$/) { $timeStamp{'end'} = join ' ', ( split /\s+/ )[ 0 .. 1 ]; - if ($_ !~ /\[(-?\d+(?:\.\d+)?)\/(-?\d+(?:\.\d+)?)\]\s+\[([^\]]+)\].+? time: (\d+\.\d+)ms real/) { + if ($_ !~ /\[(NaN|-?\d+(?:\.\d+)?)\/(-?\d+(?:\.\d+)?)\]\s+\[([^\]]+)\].+? time: (\d+\.\d+)ms real/) { #print "BAD: $_\n"; next; }