Skip to content

Commit 247ac59

Browse files
committed
Make sure we're always dealing with unicode
1 parent 4c0e383 commit 247ac59

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xero/manager.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ def _prepare_data_for_save(self, data):
148148
else:
149149
root_elm = self.dict_to_xml(Element(self.singular), data)
150150

151-
return tostring(root_elm)
151+
# In python3 this seems to return a bytestring
152+
return six.u(tostring(root_elm))
152153

153154
def _parse_api_response(self, response, resource_name):
154155
data = json.loads(response.text, object_hook=json_load_object_hook)

0 commit comments

Comments
 (0)