[Git][NTPsec/ntpsec][master] Python3: fix ntpq raw mode mrulist
Eric S. Raymond
gitlab at mg.gitlab.com
Sat Dec 3 12:27:04 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
046c9497 by Matt Selsky at 2016-12-03T01:32:10-05:00
Python3: fix ntpq raw mode mrulist
The session response is of type bytes, so the replace() needs to use bytes, as
well. But the text that's returned needs to be a string.
Fixes GitLab issue #186
- - - - -
1 changed file:
- ntpq/ntpq
Changes:
=====================================
ntpq/ntpq
=====================================
--- a/ntpq/ntpq
+++ b/ntpq/ntpq
@@ -447,7 +447,7 @@ usage: help [ command ]
# high-half characters. We won't do that unless somebody
# files a bug, Mode 6 never seems to generate those in
# variable fetches.
- text = session.response.replace(",\r\n",",\n")
+ text = polystr(session.response.replace(polybytes(",\r\n"), polybytes(",\n")))
else:
if not quiet:
self.say("status=%04x %s,\n" % \
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/046c9497e969b64eb7e199cea5f9148fd6930399
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161203/f7d3f8da/attachment.html>
More information about the vc
mailing list