From 35415a1239ca8d2d37954b6a6489066a13a5f6da Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Thu, 7 Dec 2017 22:06:15 +0200 Subject: [PATCH] Better fix for #141 --- yarl/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/yarl/__init__.py b/yarl/__init__.py index f40daf4a..6e187bb6 100644 --- a/yarl/__init__.py +++ b/yarl/__init__.py @@ -760,10 +760,7 @@ def _get_str_query(self, *args, **kwargs): "should be str or int, got {!r}".format(v)) lst.append( quoter(k, safe='/?:@') + '=' + quoter(v, safe='/?:@')) - query = '&'.join(lst) - - if not query: # the mapping might have been empty - query = '' + query = '&'.join(lst) elif isinstance(query, str): query = _quote(query, safe='/?:@', protected=PROTECT_CHARS,