Skip to content

Commit 4b33941

Browse files
committed
Files should be read and uploaded in binary mode
1 parent 5b378ca commit 4b33941

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

third_party/py/googlestorage/publish_release.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def _upload(auth_http, project_id, bucket_name, file_path, object_name, acl):
109109
object_name: The name within the bucket to upload to.
110110
acl: The ACL to assign to the uploaded file.
111111
"""
112-
with open(file_path, 'r') as f:
112+
with open(file_path, 'rb') as f:
113113
data = f.read()
114114
content_type, content_encoding = mimetypes.guess_type(file_path)
115115

0 commit comments

Comments
 (0)