mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-13 22:03:04 +00:00
Even more progress towards passing Python 3 tests.
This commit is contained in:
parent
069fcb91eb
commit
8512bdcd8d
@ -1,6 +1,6 @@
|
||||
from __future__ import print_function
|
||||
|
||||
import urllib
|
||||
from urllib.parse import quote as url_quote
|
||||
from allmydata.scripts.common import get_alias, DEFAULT_ALIAS, escape_path, \
|
||||
UnknownAliasError
|
||||
from allmydata.scripts.common_http import do_http, format_http_error
|
||||
@ -20,7 +20,7 @@ def get(options):
|
||||
except UnknownAliasError as e:
|
||||
e.display(stderr)
|
||||
return 1
|
||||
url = nodeurl + "uri/%s" % urllib.quote(rootcap)
|
||||
url = nodeurl + "uri/%s" % url_quote(rootcap)
|
||||
if path:
|
||||
url += "/" + escape_path(path)
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
from __future__ import print_function
|
||||
|
||||
from past.builtins import unicode
|
||||
from six import ensure_text
|
||||
from six import ensure_text, ensure_str
|
||||
|
||||
import time
|
||||
from urllib.parse import quote as url_quote
|
||||
@ -153,9 +153,9 @@ def list(options):
|
||||
line.append(quote_output(name) + classify)
|
||||
|
||||
if options["uri"]:
|
||||
line.append(uri)
|
||||
line.append(ensure_str(uri))
|
||||
if options["readonly-uri"]:
|
||||
line.append(quote_output(ro_uri or "-", quotemarks=False))
|
||||
line.append(quote_output(ensure_str(ro_uri) or "-", quotemarks=False))
|
||||
|
||||
rows.append((encoding_error, line))
|
||||
|
||||
|
@ -153,7 +153,7 @@ class Backup(GridTestMixin, CLITestMixin, StallMixin, unittest.TestCase):
|
||||
lines = out.split("\n")
|
||||
children = dict([line.split() for line in lines if line])
|
||||
latest_uri = children["Latest"]
|
||||
self.failUnless(latest_uri.startswith(b"URI:DIR2-CHK:"), latest_uri)
|
||||
self.failUnless(latest_uri.startswith("URI:DIR2-CHK:"), latest_uri)
|
||||
childnames = children.keys()
|
||||
self.failUnlessReallyEqual(sorted(childnames), ["Archives", "Latest"])
|
||||
d.addCallback(_check1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user