Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Unified Diff: testing/legion/client_rpc_server.py

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/legion/client_rpc_methods.py ('k') | testing/legion/common_lib.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/legion/client_rpc_server.py
diff --git a/testing/legion/rpc_server.py b/testing/legion/client_rpc_server.py
similarity index 94%
rename from testing/legion/rpc_server.py
rename to testing/legion/client_rpc_server.py
index 43b431707e851c0601058c401a3dcf3d0201c255..7a5f565156da667f7454703d4a04df3d145d7d92 100644
--- a/testing/legion/rpc_server.py
+++ b/testing/legion/client_rpc_server.py
@@ -2,10 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-"""The task RPC server code.
+"""The client RPC server code.
This server is an XML-RPC server which serves code from
-rpc_methods.RPCMethods.
+client_rpc_methods.RPCMethods.
This server will run until shutdown is called on the server object. This can
be achieved in 2 ways:
@@ -22,8 +22,8 @@ import SimpleXMLRPCServer
import SocketServer
#pylint: disable=relative-import
+import client_rpc_methods
import common_lib
-import rpc_methods
class RequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler):
@@ -33,10 +33,10 @@ class RequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler):
"""
def do_POST(self):
- """Verifies the task is authorized to perform RPCs."""
+ """Verifies the client is authorized to perform RPCs."""
if self.client_address[0] != self.server.authorized_address:
logging.error('Received unauthorized RPC request from %s',
- self.task_address[0])
+ self.client_address[0])
self.send_response(403)
response = 'Forbidden'
self.send_header('Content-type', 'text/plain')
@@ -60,7 +60,7 @@ class RPCServer(SimpleXMLRPCServer.SimpleXMLRPCServer,
self.authorized_address = authorized_address
self.idle_timeout_secs = idle_timeout_secs
- self.register_instance(rpc_methods.RPCMethods(self))
+ self.register_instance(client_rpc_methods.RPCMethods(self))
self._shutdown_requested_event = threading.Event()
self._rpc_received_event = threading.Event()
« no previous file with comments | « testing/legion/client_rpc_methods.py ('k') | testing/legion/common_lib.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698