mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-30 01:38:55 +00:00
More passing tests on Python 3.
This commit is contained in:
parent
73537351a7
commit
a27dc83920
@ -674,7 +674,7 @@ def url_for_string(req, url_string):
|
||||
and the given URL string.
|
||||
"""
|
||||
url = DecodedURL.from_text(url_string.decode("utf-8"))
|
||||
if url.host == b"":
|
||||
if not url.host:
|
||||
root = req.URLPath()
|
||||
netloc = root.netloc.split(b":", 1)
|
||||
if len(netloc) == 1:
|
||||
|
@ -66,8 +66,8 @@ def POSTUnlinkedCHK(req, client):
|
||||
# if when_done= is provided, return a redirect instead of our
|
||||
# usual upload-results page
|
||||
def _done(upload_results, redir_to):
|
||||
if "%(uri)s" in redir_to:
|
||||
redir_to = redir_to.replace("%(uri)s", urlquote(upload_results.get_uri()))
|
||||
if b"%(uri)s" in redir_to:
|
||||
redir_to = redir_to.replace(b"%(uri)s", urlquote(upload_results.get_uri()).encode("utf-8"))
|
||||
return url_for_string(req, redir_to)
|
||||
d.addCallback(_done, when_done)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user