Skip to content
This repository has been archived by the owner on Sep 23, 2022. It is now read-only.

Commit

Permalink
unicode support added in _make_path in esclient.py
Browse files Browse the repository at this point in the history
  • Loading branch information
scamurcuoglu committed Aug 28, 2013
1 parent f84d773 commit 6694dfe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion esclient.py
Expand Up @@ -18,6 +18,10 @@ def get_version():
return "%s.%s.%s" % __version__


def _utf8_encode(component):
return component.encode("utf-8")


class ESClientException(Exception):
pass

Expand Down Expand Up @@ -57,7 +61,7 @@ def _make_path(self, path_components):
ignored.
"""
path_components = map(str, filter(None, path_components))
path_components = map(_utf8_encode, filter(None, path_components))
path_components = map(quote_plus, path_components)
path = '/'.join(path_components)
if not path.startswith('/'):
Expand Down

0 comments on commit 6694dfe

Please sign in to comment.