Commit 3baf3d01 authored by Nick Mathewson's avatar Nick Mathewson 🤹
Browse files

hs_ntor_ref.py: pass only strings to subprocess.Popen

Recent Python3 versions seem to require this on Windows.

Fixes bug 26535; bug copied from ntor_ref.py on 0.3.1.1-alpha.
parent 3c97b148
Loading
Loading
Loading
Loading

changes/bug26535.032

0 → 100644
+5 −0
Original line number Diff line number Diff line
  o Minor bugfixes (testing, compatibility):
    - When running the hs_ntor_ref.py test, make sure only to pass strings
      (rather than "bytes" objects) to the Python subprocess module.
      Python 3 on Windows seems to require this.  Fixes bug 26535; bugfix on
      0.3.1.1-alpha.
+5 −2
Original line number Diff line number Diff line
@@ -234,7 +234,10 @@ Utilities for communicating with the little-t-tor ntor wrapper to conduct the
integration tests
"""

PROG = b"./src/test/test-hs-ntor-cl"
PROG = "./src/test/test-hs-ntor-cl"
if sys.version_info[0] >= 3:
    enhex=lambda s: binascii.b2a_hex(s).decode("ascii")
else:
    enhex=lambda s: binascii.b2a_hex(s)
dehex=lambda s: binascii.a2b_hex(s.strip())