Commit d23caa25 authored by dpranke@chromium.org's avatar dpranke@chromium.org

run-webkit-tests: fix crash when trying to read a log that did not exist.

During error recovery after failing to start a server, there might actually
not be an error log where we think there should be one.

TBR=eseidel@chromium.org
BUG=378444

Review URL: https://codereview.chromium.org/421413002

git-svn-id: svn://svn.chromium.org/blink/trunk@179077 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 9f533071
...@@ -210,7 +210,7 @@ class ServerBase(object): ...@@ -210,7 +210,7 @@ class ServerBase(object):
_log.error('%s no stderr handle' % self._name) _log.error('%s no stderr handle' % self._name)
else: else:
_log.error('%s no process' % self._name) _log.error('%s no process' % self._name)
if self._error_log_path: if self._error_log_path and self._filesystem.exists(self._error_log_path):
error_log_text = self._filesystem.read_text_file(self._error_log_path) error_log_text = self._filesystem.read_text_file(self._error_log_path)
if error_log_text: if error_log_text:
_log.error('%s error log (%s) contents:' % (self._name, self._error_log_path)) _log.error('%s error log (%s) contents:' % (self._name, self._error_log_path))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment