mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 07:06:41 +00:00
Port to Python 3.
This commit is contained in:
parent
e140dc06ea
commit
15d6ab610d
@ -1,4 +1,14 @@
|
||||
from past.builtins import unicode
|
||||
"""
|
||||
Ported to Pythn 3.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
|
||||
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
|
||||
|
||||
import os
|
||||
import mock
|
||||
@ -51,7 +61,7 @@ class _FakeWormhole(object):
|
||||
|
||||
def _create_fake_wormhole(outgoing_messages):
|
||||
outgoing_messages = [
|
||||
m.encode("utf-8") if isinstance(m, unicode) else m
|
||||
m.encode("utf-8") if isinstance(m, str) else m
|
||||
for m in outgoing_messages
|
||||
]
|
||||
return _FakeWormhole(outgoing_messages)
|
||||
|
@ -145,6 +145,7 @@ PORTED_MODULES = [
|
||||
PORTED_TEST_MODULES = [
|
||||
"allmydata.test.cli.test_alias",
|
||||
"allmydata.test.cli.test_create",
|
||||
"allmydata.test.cli.test_invite",
|
||||
"allmydata.test.cli.test_status",
|
||||
|
||||
"allmydata.test.mutable.test_checker",
|
||||
|
Loading…
Reference in New Issue
Block a user