[Git][NTPsec/ntpsec][master] ntpviz: Python 2.6 has no collections.Counter(), use defaultdict()

Gary E. Miller gitlab at mg.gitlab.com
Tue Sep 26 21:47:52 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
82ef43fa by Gary E. Miller at 2017-09-26T14:47:04-07:00
ntpviz: Python 2.6 has no collections.Counter(), use defaultdict()

- - - - -


1 changed file:

- ntpclients/ntpviz


Changes:

=====================================
ntpclients/ntpviz
=====================================
--- a/ntpclients/ntpviz
+++ b/ntpclients/ntpviz
@@ -1164,7 +1164,8 @@ plot \
             rnd1 = 9        # round to 1 ns boxes
             out['boxwidth'] = S_PER_NS
 
-        cnt = collections.Counter()
+        # Python 2.6  has no collections.Counter(), so fake it.
+        cnt = collections.defaultdict(int)
         for value in values:
             # put into buckets
             # for a +/- 50 microSec range that is 1,000 buckets to plot



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/82ef43fac129dcc66aa1cd2e53b92875f94c0382

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/82ef43fac129dcc66aa1cd2e53b92875f94c0382
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170926/837a28fc/attachment.html>


More information about the vc mailing list