Skip to content

Commit c4bea88

Browse files
committed
Open privkey file in binary mode.
Fixes #361.
1 parent efae0ef commit c4bea88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gcloud/credentials.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ def get_for_service_account(client_email, private_key_path, scope=None):
3434
"""
3535
return client.SignedJwtAssertionCredentials(
3636
service_account_name=client_email,
37-
private_key=open(private_key_path).read(),
37+
private_key=open(private_key_path, 'rb').read(),
3838
scope=scope)

0 commit comments

Comments
 (0)