Skip to content

Commit 35d7602

Browse files
nehebstephenfin
authored andcommitted
Fix write API error
Without that b, python 3.6 complains about write not being a string on Arch Linux.
1 parent 9629d86 commit 35d7602

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git_pw/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def download(url, params=None): # type: (str, dict) -> None
139139
output_fd, output_path = tempfile.mkstemp(suffix='.patch')
140140

141141
rsp = get(url, params, stream=True)
142-
with os.fdopen(output_fd, 'w') as output_file:
142+
with os.fdopen(output_fd, 'wb') as output_file:
143143
LOG.debug('Saving to %s', output_path)
144144
# we use iter_content because patches can be binary
145145
for block in rsp.iter_content(1024):

0 commit comments

Comments
 (0)