Skip to content

Commit

Permalink
Make sure we're always dealing with unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanlister committed Oct 11, 2015
1 parent 4c0e383 commit 247ac59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xero/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ def _prepare_data_for_save(self, data):
else:
root_elm = self.dict_to_xml(Element(self.singular), data)

return tostring(root_elm)
# In python3 this seems to return a bytestring
return six.u(tostring(root_elm))

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

0 comments on commit 247ac59

Please sign in to comment.