Bugfix: Pass encoding for urlparse hack

This commit is contained in:
Markus Unterwaditzer 2015-12-18 17:31:12 +01:00
parent 8104a91769
commit 16f0c033c2

View file

@ -27,7 +27,7 @@ def _wrap_native(f, encoding='utf-8'):
@functools.wraps(f)
def wrapper(x, *a, **kw):
to_orig = to_unicode if isinstance(x, text_type) else to_bytes
return to_orig(f(to_native(x, encoding), *a, **kw))
return to_orig(f(to_native(x, encoding), *a, **kw), encoding)
return wrapper