Commit 99591e2a authored by Ben Mason's avatar Ben Mason Committed by Commit Bot

UnboundLocalError masking actual exception.

Bug: 1028130
Change-Id: Iea128cde9bc83cfc962776c48d4037e1d0ba75d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1934240
Commit-Queue: Ben Mason <benmason@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718677}
parent b7277af4
......@@ -561,6 +561,7 @@ class LocalDeviceInstrumentationTestRun(
with ui_capture_dir:
with self._env.output_manager.ArchivedTempfile(
stream_name, 'logcat') as logcat_file:
logmon = None
try:
with logcat_monitor.LogcatMonitor(
device.adb,
......@@ -575,7 +576,8 @@ class LocalDeviceInstrumentationTestRun(
output = device.StartInstrumentation(
target, raw=True, extras=extras, timeout=timeout, retries=0)
finally:
logmon.Close()
if logmon:
logmon.Close()
if logcat_file.Link():
logging.info('Logcat saved to %s', logcat_file.Link())
......
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