Skip to content

Commit

Permalink
use str instead of Text to appease Python 2.7
Browse files Browse the repository at this point in the history
The Python 2.7 Linux test runner doesn't have typing module available.
  • Loading branch information
lifanov committed Feb 22, 2019
1 parent 91db94b commit a916a53
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/python/grpcio/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@

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')
Expand Down Expand Up @@ -224,7 +222,7 @@ def compiler_ok_with_extra_std():
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
Expand Down

0 comments on commit a916a53

Please sign in to comment.