-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python2-ism in neg TELNET server #2929
Labels
Comments
This seems to fix it (as per isolated tests with 2.7.15 and 3.7.0): diff --git a/tests/negtelnetserver.py b/tests/negtelnetserver.py
index 8cfd4093b..2ace8acd6 100755
--- a/tests/negtelnetserver.py
+++ b/tests/negtelnetserver.py
@@ -34,7 +34,7 @@ def telnetserver(options):
if options.pidfile:
pid = os.getpid()
with open(options.pidfile, "w") as f:
- f.write(b"{0}".format(pid))
+ f.write("{0}".format(pid))
local_bind = (HOST, options.port)
log.info("Listening on %s", local_bind) |
@MarcelRaad that fix good for you as well? |
Yes, that seems to work for me, thanks @vszakats !
And if I then patch line 200 (and possibly 135) in the same way, I get:
|
infinnovation-dev
pushed a commit
to infinnovation-dev/curl
that referenced
this issue
Oct 2, 2018
Fix problems caused by differences in treatment of bytes objects between python2 and python3.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I did this
./runtests.pl 1452
I expected the following
Running the test. Instead, I got:
negtelnetserver.py (added in 06a6feb) tries hard to support both Python 2 and 3, but
b"{0}".format(pid)
doesn't seem to work in Python 3.curl/libcurl version
7.61.1-DEV
operating system
MSYS/MinGW with Python 3.6.6 on Windows 10
The text was updated successfully, but these errors were encountered: