[Git][NTPsec/ntpsec][master] Fix OrderedDict test
Matt Selsky
gitlab at mg.gitlab.com
Wed Jan 11 06:07:11 UTC 2017
Matt Selsky pushed to branch master at NTPsec / ntpsec
Commits:
36a8c26a by Matt Selsky at 2017-01-11T01:04:42-05:00
Fix OrderedDict test
Existing code would have raised:
AttributeError: 'module' object has no attribute 'OrderedDict'
Instead import the class directly into the current namespace to force an
ImportError exception
- - - - -
1 changed file:
- pylib/util.py
Changes:
=====================================
pylib/util.py
=====================================
--- a/pylib/util.py
+++ b/pylib/util.py
@@ -625,8 +625,7 @@ class IfstatsSummary:
return s
try:
- import collections
- OrderedDict = collections.OrderedDict
+ from collections import OrderedDict
except ImportError:
class OrderedDict(dict):
"A stupid simple implementation in order to be back-portable to 2.6"
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/36a8c26af30828055fa90a773deb9fd9bb4a2dff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170111/6ede9fb3/attachment.html>
More information about the vc
mailing list