mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-31 00:24:13 +00:00
Some progress towards passing on Python 3.
This commit is contained in:
parent
109829dfcb
commit
3f2571480c
@ -5,12 +5,14 @@ from __future__ import (
|
|||||||
division,
|
division,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from six import ensure_text
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from os.path import (
|
from os.path import (
|
||||||
join,
|
join,
|
||||||
)
|
)
|
||||||
from urlparse import (
|
from urllib.parse import (
|
||||||
urlsplit,
|
urlsplit,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -68,7 +70,7 @@ def _connect_client(reactor, api_auth_token, ws_url):
|
|||||||
factory = WebSocketClientFactory(
|
factory = WebSocketClientFactory(
|
||||||
url=ws_url,
|
url=ws_url,
|
||||||
headers={
|
headers={
|
||||||
"Authorization": "{} {}".format(SCHEME, api_auth_token),
|
"Authorization": "{} {}".format(str(SCHEME, "ascii"), api_auth_token),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
factory.protocol = _StreamingLogClientProtocol
|
factory.protocol = _StreamingLogClientProtocol
|
||||||
@ -127,7 +129,7 @@ def _test_streaming_logs(reactor, temp_dir, alice):
|
|||||||
node_url = cfg.get_config_from_file("node.url")
|
node_url = cfg.get_config_from_file("node.url")
|
||||||
api_auth_token = cfg.get_private_config("api_auth_token")
|
api_auth_token = cfg.get_private_config("api_auth_token")
|
||||||
|
|
||||||
ws_url = node_url.replace("http://", "ws://")
|
ws_url = ensure_text(node_url).replace("http://", "ws://")
|
||||||
log_url = ws_url + "private/logs/v1"
|
log_url = ws_url + "private/logs/v1"
|
||||||
|
|
||||||
print("Connecting to {}".format(log_url))
|
print("Connecting to {}".format(log_url))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user