mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-03-31 15:50:42 +00:00
Add workaround for compatibility on Python 2 where test.cli.test_create_alias expects the URL to be a byte string, broken in d02334bfd5ac.
This commit is contained in:
parent
6118d1a2d2
commit
939988a042
@ -285,4 +285,8 @@ def escape_path(path):
|
||||
True
|
||||
"""
|
||||
segments = path.split("/")
|
||||
return "/".join([urllib.parse.quote(unicode_to_url(s)) for s in segments])
|
||||
result = "/".join([urllib.parse.quote(unicode_to_url(s)) for s in segments])
|
||||
# fixme: test.cli.test_create_alias fails if it gets Unicode on Python 2
|
||||
if PY2 and isinstance(result, type(u'')):
|
||||
result = result.encode('ascii')
|
||||
return result
|
||||
|
Loading…
x
Reference in New Issue
Block a user