diff --git a/MotorControl/MotorServer.py b/MotorControl/MotorServer.py index bb13589..635a95a 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 = bytes(open(pvtKeyPath).read()) - pvtCertBytes = bytes(open(pvtCertPath).read()) + pvtKeyBytes = open(pvtKeyPath, 'rb').read() + pvtCertBytes = open(pvtCertPath, 'rb').read() return grpc.ssl_channel_credentials(pvtCertBytes, pvtKeyBytes)