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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process.py

Issue 1783073002: Run auto-formatter on files in webkitpy/layout_tests/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ran yapf -i --style '{based_on_style: pep8, column_limit: 132}' then did manual fix-up 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
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process.py
index f9ec1a7dc54de97f04c8820c79ed540e08faf48d..66b010fe3c913dc15f53296b93fd082a8b6b2b75 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process.py
@@ -25,7 +25,6 @@
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
"""Package that implements the ServerProcess wrapper class"""
import errno
@@ -55,10 +54,8 @@ else:
from webkitpy.common.system.executive import ScriptError
-
_log = logging.getLogger(__name__)
-
_trailing_spaces_re = re.compile('(.*[^ ])?( +)$')
@@ -72,6 +69,7 @@ def quote_data(data):
lines.append(l)
return lines
+
class ServerProcess(object):
"""This class provides a wrapper around a subprocess that
implements a simple request/response usage model. The primary benefit
@@ -79,8 +77,7 @@ class ServerProcess(object):
indefinitely. The class also handles transparently restarting processes
as necessary to keep issuing commands."""
- def __init__(self, port_obj, name, cmd, env=None, universal_newlines=False, treat_no_data_as_crash=False,
- logging=False):
+ def __init__(self, port_obj, name, cmd, env=None, universal_newlines=False, treat_no_data_as_crash=False, logging=False):
self._port = port_obj
self._name = name # Should be the command name (e.g. content_shell, image_diff)
self._cmd = cmd
@@ -136,12 +133,13 @@ class ServerProcess(object):
if self._env:
env_str += '\n'.join("%s=%s" % (k, v) for k, v in self._env.items()) + '\n'
_log.info('CMD: \n%s%s\n', env_str, _quote_cmd(self._cmd))
- self._proc = self._host.executive.popen(self._cmd, stdin=self._host.executive.PIPE,
- stdout=self._host.executive.PIPE,
- stderr=self._host.executive.PIPE,
- close_fds=close_fds,
- env=self._env,
- universal_newlines=self._universal_newlines)
+ self._proc = self._host.executive.popen(self._cmd,
+ stdin=self._host.executive.PIPE,
+ stdout=self._host.executive.PIPE,
+ stderr=self._host.executive.PIPE,
+ close_fds=close_fds,
+ env=self._env,
+ universal_newlines=self._universal_newlines)
self._pid = self._proc.pid
fd = self._proc.stdout.fileno()
if not self._use_win32_apis:
@@ -215,7 +213,8 @@ class ServerProcess(object):
return None # Instructs the caller to keep waiting.
return_value = self._read(deadline, retrieve_bytes_from_buffers)
- # FIXME: This is a bit of a hack around the fact that _read normally only returns one value, but this caller wants it to return two.
+ # FIXME: This is a bit of a hack around the fact that _read normally only
+ # returns one value, but this caller wants it to return two.
if return_value is None:
return None, None
return return_value

Powered by Google App Engine
This is Rietveld 408576698