Skip to content

Commit

Permalink
Merge pull request #1 from giosg/client_str_to_bytes
Browse files Browse the repository at this point in the history
Fixed the str write bug
  • Loading branch information
Valdemar authored Nov 13, 2020
2 parents 08e5e68 + 0ad9b1c commit e35f233
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion snakebite/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,10 @@ def getmerge(self, path, dst, newline=False, check_crc=False):
for item in self._find_items([path], processor, include_toplevel=True, recurse=False, include_children=True):
for load in item:
if load['result']:
f.write(load['response'])
response = load['response']
if type(response) == str:
response = response.encode('utf8')
f.write(response)
elif not load['error'] is '':
if os.path.isfile(temporary_target):
os.remove(temporary_target)
Expand Down

0 comments on commit e35f233

Please sign in to comment.