[Git][NTPsec/ntpsec][master] ntpviz: ignore blank log lines.

Eric S. Raymond gitlab at mg.gitlab.com
Tue Aug 16 03:06:18 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
46b14fc2 by Eric S. Raymond at 2016-08-15T23:06:08-04:00
ntpviz: ignore blank log lines.

- - - - -


1 changed file:

- ntpstats/ntpstats.py


Changes:

=====================================
ntpstats/ntpstats.py
=====================================
--- a/ntpstats/ntpstats.py
+++ b/ntpstats/ntpstats.py
@@ -41,6 +41,8 @@ class NTPStats:
                         lines += open(logpart).readlines()
             except IOError:
                 pass
+            # Filter out blank lines (we don't know where these come from)
+            lines = [line for line in lines if line.strip()]
             # Sort by date
             lines.sort(key=NTPStats.stampfields)
             # Morph first field into Unix time with fractional seconds 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/46b14fc2a3ac055269e72ddc0dc0d5abfbd49cdb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160816/86c7c6c0/attachment.html>


More information about the vc mailing list