use str instead of Text to appease Python 2.7

The Python 2.7 Linux test runner doesn't have typing module available.
pull/18116/head
Nikolai Lifanov 6 years ago
parent 91db94b278
commit a916a53347
  1. 4
      src/python/grpcio/commands.py

@ -33,8 +33,6 @@ from setuptools.command import test
import support
from typing import Text
PYTHON_STEM = os.path.dirname(os.path.abspath(__file__))
GRPC_STEM = os.path.abspath(PYTHON_STEM + '../../../../')
PROTO_STEM = os.path.join(GRPC_STEM, 'src', 'proto')
@ -224,7 +222,7 @@ class BuildExt(build_ext.build_ext):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
_, cc_err = cc_test.communicate(input='int main(){return 0;}')
return not 'invalid argument' in Text(cc_err)
return not 'invalid argument' in str(cc_err)
# This special conditioning is here due to difference of compiler
# behavior in gcc and clang. The clang doesn't take --stdc++11

Loading…
Cancel
Save