[Git][NTPsec/ntpsec][master] Possible fix for ntpq unicode issue

Ian Bruene gitlab at mg.gitlab.com
Mon Oct 2 13:19:41 UTC 2017


Ian Bruene pushed to branch master at NTPsec / ntpsec


Commits:
f5bd6314 by Ian Bruene at 2017-10-02T08:19:23-05:00
Possible fix for ntpq unicode issue

- - - - -


1 changed file:

- ntpclients/ntpq


Changes:

=====================================
ntpclients/ntpq
=====================================
--- a/ntpclients/ntpq
+++ b/ntpclients/ntpq
@@ -69,12 +69,12 @@ if str is bytes:  # Python 2
     def string_escape(s):
         return s.decode('string_escape')
 
-    if sys.stdout.encoding != "UTF-8":
-        forced_utf8 = True
-        sys.stdout = codecs.getwriter('UTF-8')(sys.stdout)
-    if sys.stderr.encoding != "UTF-8":
-        forced_utf8 = True
-        sys.stderr = codecs.getwriter('UTF-8')(sys.stderr)
+    #if sys.stdout.encoding != "UTF-8":
+    #    forced_utf8 = True
+    sys.stdout = codecs.getwriter('UTF-8')(sys.stdout)
+    #if sys.stderr.encoding != "UTF-8":
+    #    forced_utf8 = True
+    sys.stderr = codecs.getwriter('UTF-8')(sys.stderr)
 
 else:  # Python 3
     import io



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

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/f5bd6314795be0380eb1c4bdfb872c7edfa9ee82
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/20171002/79ac1f2d/attachment.html>


More information about the vc mailing list