Merge pull request #7116 from kpayson64/python_windows_fix

Convert windows dll filename to bytes
This commit is contained in:
Jan Tattermusch 2016-06-29 13:50:32 -07:00 committed by GitHub
commit 01d7dbac1f
1 changed files with 2 additions and 0 deletions

View File

@ -53,6 +53,8 @@ def _initialize():
if 'win32' in sys.platform:
filename = pkg_resources.resource_filename(
'grpc._cython', '_windows/grpc_c.64.python')
if not isinstance(filename, bytes):
filename = filename.encode()
if not pygrpc_load_core(filename):
raise ImportError('failed to load core gRPC library')
if not pygrpc_initialize_core():