mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 05:28:04 +00:00
Port to Python 3.
This commit is contained in:
parent
279d6b6542
commit
293cea6fd2
@ -1,4 +1,14 @@
|
||||
from past.builtins import unicode
|
||||
"""
|
||||
Ported to Python 3.
|
||||
"""
|
||||
from __future__ import unicode_literals
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from future.utils import PY2
|
||||
if PY2:
|
||||
from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min # noqa: F401
|
||||
|
||||
from urllib.parse import quote as url_quote
|
||||
|
||||
@ -18,7 +28,7 @@ def webopen(options, opener=None):
|
||||
except UnknownAliasError as e:
|
||||
e.display(stderr)
|
||||
return 1
|
||||
path = unicode(path, "utf-8")
|
||||
path = str(path, "utf-8")
|
||||
if path == '/':
|
||||
path = ''
|
||||
url = nodeurl + "uri/%s" % url_quote(rootcap)
|
||||
|
@ -116,6 +116,7 @@ PORTED_MODULES = [
|
||||
"allmydata.scripts.tahoe_run",
|
||||
"allmydata.scripts.tahoe_status",
|
||||
"allmydata.scripts.tahoe_unlink",
|
||||
"allmydata.scripts.tahoe_webopen",
|
||||
"allmydata.scripts.types_",
|
||||
"allmydata.stats",
|
||||
"allmydata.storage_client",
|
||||
|
Loading…
Reference in New Issue
Block a user