mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-23 23:02:25 +00:00
Port to Python 3.
This commit is contained in:
parent
aef8705b6f
commit
53482dd8ac
@ -1,6 +1,14 @@
|
||||
"""
|
||||
Ported to Python 3.
|
||||
"""
|
||||
from __future__ import unicode_literals
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from past.builtins import unicode
|
||||
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
|
||||
from allmydata.scripts.common_http import do_http, check_http_error
|
||||
@ -37,7 +45,7 @@ def mkdir(options):
|
||||
return 0
|
||||
|
||||
# create a new directory at the given location
|
||||
path = unicode(path, "utf-8")
|
||||
path = str(path, "utf-8")
|
||||
if path.endswith("/"):
|
||||
path = path[:-1]
|
||||
# path must be "/".join([s.encode("utf-8") for s in segments])
|
||||
|
@ -110,6 +110,7 @@ PORTED_MODULES = [
|
||||
"allmydata.scripts.tahoe_invite",
|
||||
"allmydata.scripts.tahoe_ls",
|
||||
"allmydata.scripts.tahoe_manifest",
|
||||
"allmydata.scripts.tahoe_mkdir",
|
||||
"allmydata.scripts.types_",
|
||||
"allmydata.stats",
|
||||
"allmydata.storage_client",
|
||||
|
Loading…
Reference in New Issue
Block a user