From 0ad9b1cdeefac8da7b7895ad6c1b07b6cea92d4e Mon Sep 17 00:00:00 2001 From: Valdemar Lubenets Date: Fri, 13 Nov 2020 10:56:28 +0200 Subject: [PATCH] Fixed the str write bug --- snakebite/client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/snakebite/client.py b/snakebite/client.py index d8ef7e3..ee259d2 100644 --- a/snakebite/client.py +++ b/snakebite/client.py @@ -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)