You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/11/04 19:50:28 UTC

[GitHub] [airflow] mtraynham commented on a change in pull request #12094: Correct reading grpc credentials file

mtraynham commented on a change in pull request #12094:
URL: https://github.com/apache/airflow/pull/12094#discussion_r517592396



##########
File path: airflow/providers/grpc/hooks/grpc.py
##########
@@ -72,7 +72,7 @@ def get_conn(self) -> grpc.Channel:
             channel = grpc.insecure_channel(base_url)
         elif auth_type in {"SSL", "TLS"}:
             credential_file_name = self._get_field("credential_pem_file")
-            creds = grpc.ssl_channel_credentials(open(credential_file_name).read())
+            creds = grpc.ssl_channel_credentials(open(credential_file_name, "rb").read())

Review comment:
       I hadn't planned on changing anything but the mode of the read, but I'll commit your suggestion.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org