From e90033c7cc3994c2e6c2c0655f93f45f331b3e28 Mon Sep 17 00:00:00 2001 From: Piv <18462828+Piv200@users.noreply.github.com> Date: Sun, 17 Nov 2019 17:25:13 +1030 Subject: [PATCH] Use string rather than bytes for server credentials. --- MotorControl/MotorServer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MotorControl/MotorServer.py b/MotorControl/MotorServer.py index 8b67b2d..911f115 100755 --- a/MotorControl/MotorServer.py +++ b/MotorControl/MotorServer.py @@ -66,8 +66,8 @@ class MotorServicer(motorService_pb2_grpc.CarControlServicer): pvtKeyPath = '/home/pi/tls/device.key' pvtCertPath = '/home/pi/tls/device.crt' - pvtKeyBytes = open(pvtKeyPath, 'rb').read() - pvtCertBytes = open(pvtCertPath, 'rb').read() + pvtKeyBytes = open(pvtKeyPath).read() + pvtCertBytes = open(pvtCertPath).read() return grpc.ssl_server_credentials([pvtKeyBytes, pvtCertBytes])