[Git][NTPsec/ntpsec][master] Updated comments to document sys.stdout.encoding being fake news

Ian Bruene gitlab at mg.gitlab.com
Mon Oct 2 13:29:24 UTC 2017


Ian Bruene pushed to branch master at NTPsec / ntpsec


Commits:
84511e7a by Ian Bruene at 2017-10-02T08:25:48-05:00
Updated comments to document sys.stdout.encoding being fake news

- - - - -


1 changed file:

- ntpclients/ntpq


Changes:

=====================================
ntpclients/ntpq
=====================================
--- a/ntpclients/ntpq
+++ b/ntpclients/ntpq
@@ -69,11 +69,9 @@ if str is bytes:  # Python 2
     def string_escape(s):
         return s.decode('string_escape')
 
-    #if sys.stdout.encoding != "UTF-8":
-    #    forced_utf8 = True
+    # Originally these only triggered if sys.stdout.encoding != "UTF-8":
+    # Unfortunately sometimes sys.stdout.encoding lies
     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



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

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/84511e7af81c150cafc3de52d70f5146ad18469d
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/c08a643b/attachment.html>


More information about the vc mailing list