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

Unified Diff: testing/legion/rpc_methods.py

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 9 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/process.py ('k') | testing/legion/rpc_server.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/legion/rpc_methods.py
diff --git a/testing/legion/rpc_methods.py b/testing/legion/rpc_methods.py
deleted file mode 100644
index 24d0312c252b5c4d111e4c203c679582e49308a5..0000000000000000000000000000000000000000
--- a/testing/legion/rpc_methods.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Defines the task RPC methods."""
-
-import logging
-import os
-import sys
-import threading
-
-#pylint: disable=relative-import
-import process
-
-
-class RPCMethods(object):
- """Class exposing RPC methods."""
-
- _dotted_whitelist = ['subprocess']
-
- def __init__(self, server):
- self._server = server
- self.subprocess = process.Process
-
- def _dispatch(self, method, params):
- obj = self
- if '.' in method:
- # Allow only white listed dotted names
- name, method = method.split('.')
- assert name in self._dotted_whitelist
- obj = getattr(self, name)
- return getattr(obj, method)(*params)
-
- def Echo(self, message):
- """Simple RPC method to print and return a message."""
- logging.info('Echoing %s', message)
- return 'echo %s' % str(message)
-
- def AbsPath(self, path):
- """Returns the absolute path."""
- return os.path.abspath(path)
-
- def Quit(self):
- """Call _server.shutdown in another thread.
-
- This is needed because server.shutdown waits for the server to actually
- quit. However the server cannot shutdown until it completes handling this
- call. Calling this in the same thread results in a deadlock.
- """
- t = threading.Thread(target=self._server.shutdown)
- t.start()
« no previous file with comments | « testing/legion/process.py ('k') | testing/legion/rpc_server.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698