[Git][NTPsec/ntpsec][master] ntpq: only import codecs on python2.

Gary E. Miller gitlab at mg.gitlab.com
Fri Sep 29 00:41:30 UTC 2017


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


Commits:
75dc0e38 by Gary E. Miller at 2017-09-28T16:25:04-07:00
ntpq: only import codecs on python2.

- - - - -


1 changed file:

- ntpclients/ntpq


Changes:

=====================================
ntpclients/ntpq
=====================================
--- a/ntpclients/ntpq
+++ b/ntpclients/ntpq
@@ -21,7 +21,6 @@ import resource
 import socket
 import sys
 import time
-import codecs
 
 try:
     import ntp.control
@@ -62,6 +61,8 @@ version = ntp.util.stdversion()
 forced_utf8 = False
 
 if str is bytes:  # Python 2
+    import codecs
+
     polystr = unicode
     polybytes = bytes
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/75dc0e38e4b8b29e91eb4c07faa52c17cf92c3b7

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/75dc0e38e4b8b29e91eb4c07faa52c17cf92c3b7
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/20170929/485c86ad/attachment.html>


More information about the vc mailing list