aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Ken Payson <kpayson@google.com>2016-06-28 11:37:27 -0700
committerGravatar Ken Payson <kpayson@google.com>2016-06-28 11:41:42 -0700
commit110601d8e1b225ccee3696e82ace070239ec3d5a (patch)
treef1319997dd5f6d02590d2d57013b658434357fc2
parentb4028f6675a3c3d24fdbb3bed4e4a3939ccbb434 (diff)
Convert windows dll filename to bytes
-rw-r--r--src/python/grpcio/grpc/_cython/cygrpc.pyx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/python/grpcio/grpc/_cython/cygrpc.pyx b/src/python/grpcio/grpc/_cython/cygrpc.pyx
index c92a8d19a7..7a8d0dd8a1 100644
--- a/src/python/grpcio/grpc/_cython/cygrpc.pyx
+++ b/src/python/grpcio/grpc/_cython/cygrpc.pyx
@@ -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():