Browse Source
Merge pull request #2611 from hosiet/patch-1
tests/test.py: Make script compatible with python3
pull/2612/head
Max Lv
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
2 deletions
-
tests/test.py
|
@ -103,8 +103,10 @@ try: |
|
|
if stage == 4 and fd == p4.stdout: |
|
|
if stage == 4 and fd == p4.stdout: |
|
|
stage = 5 |
|
|
stage = 5 |
|
|
if bytes != str: |
|
|
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: |
|
|
if stage == 3 and p3 is not None: |
|
|
fdset.remove(p3.stdout) |
|
|
fdset.remove(p3.stdout) |
|
|