Merge pull request #22461 from ericgribkoff/python3_fix

fix encoding issue with python 3
pull/22483/head
Eric Gribkoff 5 years ago committed by GitHub
commit 04d88fbbff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      tools/run_tests/run_xds_tests.py

@ -1107,10 +1107,13 @@ try:
result.returncode = 0
except Exception as e:
result.state = 'FAILED'
result.message = str(e).encode('UTF-8')
result.message = str(e)
finally:
if client_process:
client_process.terminate()
# Workaround for Python 3, as report_utils will invoke decode() on
# result.message, which has a default value of ''.
result.message = result.message.encode('UTF-8')
test_results[test_case] = [result]
if not os.path.exists(_TEST_LOG_BASE_DIR):
os.makedirs(_TEST_LOG_BASE_DIR)

Loading…
Cancel
Save