From 69caa12fe5c51b8b9c1838e5122eb0960283a764 Mon Sep 17 00:00:00 2001 From: Piv <18462828+Piv200@users.noreply.github.com> Date: Sun, 17 Nov 2019 17:19:54 +1030 Subject: [PATCH] Use bytes rather than str for key and ca --- MotorControl/MotorServer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MotorControl/MotorServer.py b/MotorControl/MotorServer.py index c82240a..bb13589 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).read() - pvtCertBytes = open(pvtCertPath).read() + pvtKeyBytes = bytes(open(pvtKeyPath).read()) + pvtCertBytes = bytes(open(pvtCertPath).read()) return grpc.ssl_channel_credentials(pvtCertBytes, pvtKeyBytes)