Skip to content

Commit 170b9c6

Browse files
committed
Make sure to serialize numbers in url properly
1 parent ffbca79 commit 170b9c6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

elasticsearch/client/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ def _escape(part):
1616
"""
1717
if isinstance(part, (list, tuple)):
1818
part = ','.join(part)
19-
# mark ',' as safe for nicer url in logs
20-
return quote_plus(part, ',')
19+
if isinstance(part, (type(''), type(u''))):
20+
# mark ',' as safe for nicer url in logs
21+
return quote_plus(part, ',')
22+
return str(part)
2123

2224
def _make_path(*parts):
2325
"""

0 commit comments

Comments
 (0)