Commit eadbaf20 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

apk_operations.py: Make logcat exit more gracefully when adb server is restarted

Bug: 1005979
Change-Id: I72bf91be86d4c800050dd5e4ec4b21ef1f0cc241
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1815655
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarLiquan (Max) Gu <maxlg@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#698888}
parent 7a4b3ce2
......@@ -771,7 +771,11 @@ def _RunLogcat(device, package_name, mapping_path, verbose):
try:
logcat_processor.ProcessLine(line, fast)
except:
sys.stderr.write('Failed to process line: ' + line)
sys.stderr.write('Failed to process line: ' + line + '\n')
# Skip stack trace for the common case of the adb server being
# restarted.
if 'unexpected EOF' in line:
sys.exit(1)
raise
if fast and nonce in line:
fast = False
......
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