mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-30 22:13:49 +00:00
Merge pull request #2611 from hosiet/patch-1
tests/test.py: Make script compatible with python3
This commit is contained in:
+4
-2
@@ -103,8 +103,10 @@ try:
|
||||
if stage == 4 and fd == p4.stdout:
|
||||
stage = 5
|
||||
if bytes != str:
|
||||
line = str(line, 'utf8')
|
||||
sys.stderr.write(line)
|
||||
line = bytes(line)
|
||||
sys.stderr.buffer.write(line)
|
||||
else:
|
||||
sys.stderr.write(line)
|
||||
|
||||
if stage == 3 and p3 is not None:
|
||||
fdset.remove(p3.stdout)
|
||||
|
||||
Reference in New Issue
Block a user