Fix handling of errors
BUG=#1063
diff --git a/perf_insights/bin/map_traces_locally.py b/perf_insights/bin/map_traces_locally.py
index d7afd85..374c920 100644
--- a/perf_insights/bin/map_traces_locally.py
+++ b/perf_insights/bin/map_traces_locally.py
@@ -66,7 +66,7 @@
trace_handle,
os.path.abspath(map_file))
map_results.DidMapSingleTrace(trace_handle, result_value)
- if stop_on_error and result['type'] == 'failure':
+ if stop_on_error and result_value['type'] == 'failure':
failure_to_dump = (trace_handle, result_value)
break
map_results.DidMapTraces()