mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 02:01:31 +00:00
Update escape_path for Python 3 compatibility.
This commit is contained in:
parent
210eb5b529
commit
5fc9674d3a
@ -2,10 +2,12 @@
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os, sys, urllib, textwrap
|
||||
import os, sys, textwrap
|
||||
import codecs
|
||||
from os.path import join
|
||||
|
||||
from six.moves import urllib # import urllib.parse
|
||||
|
||||
try:
|
||||
from typing import Optional
|
||||
from .types_ import Parameters
|
||||
@ -284,4 +286,4 @@ def escape_path(path):
|
||||
"""
|
||||
# this always returns bytes, specifically US-ASCII, valid URL characters
|
||||
segments = path.split("/")
|
||||
return "/".join([urllib.quote(unicode_to_url(s)) for s in segments])
|
||||
return "/".join([urllib.parse.quote(unicode_to_url(s)) for s in segments])
|
||||
|
Loading…
x
Reference in New Issue
Block a user