Skip to content

Commit e43cf6f

Browse files
chfastaxic
authored andcommitted
jsonrpcproxy: Print init message
1 parent 5ddd657 commit e43cf6f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/jsonrpcproxy.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,18 @@ class Proxy(HTTPServer):
197197

198198
def __init__(self, proxy_url, backend_path):
199199

200-
proxy_url = urlparse(proxy_url)
201-
assert proxy_url.scheme == 'http'
202-
proxy_address = proxy_url.hostname, proxy_url.port
200+
url = urlparse(proxy_url)
201+
assert url.scheme == 'http'
202+
proxy_address = url.hostname, url.port
203203

204204
super(Proxy, self).__init__(proxy_address, HTTPRequestHandler)
205205

206206
self.backend_address = path.expanduser(backend_path)
207207
self.conn = get_ipc_connector(self.backend_address)
208208

209+
sys.stderr.write("JSON-RPC HTTP Proxy: {} -> {}\n".format(
210+
self.backend_address, proxy_url))
211+
209212
def process(self, request):
210213
self.conn.sendall(request)
211214

0 commit comments

Comments
 (0)