mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 10:01:54 +00:00
Remove comment, superseded by docstring.
This commit is contained in:
parent
0de90fda3f
commit
09f3e3f6b5
@ -276,7 +276,7 @@ def get_alias(aliases, path_unicode, default):
|
||||
def escape_path(path):
|
||||
# type: (str) -> str
|
||||
u"""
|
||||
Return path quoted to US-ASCII.
|
||||
Return path quoted to US-ASCII, valid URL characters.
|
||||
|
||||
>>> path = u'/føö/bar/☃'
|
||||
>>> escaped = escape_path(path)
|
||||
@ -285,6 +285,5 @@ def escape_path(path):
|
||||
>>> escaped.encode('ascii').decode('ascii') == escaped
|
||||
True
|
||||
"""
|
||||
# this always returns bytes, specifically US-ASCII, valid URL characters
|
||||
segments = path.split("/")
|
||||
return "/".join([urllib.parse.quote(unicode_to_url(s)) for s in segments])
|
||||
|
Loading…
x
Reference in New Issue
Block a user