summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-06-12 07:15:46 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-06-12 07:15:46 +0000
commite7b09fb10dc6cf22852c8daf6ae4ce1614d8e71f (patch)
tree9bdde6355d276697a5c4501567f0dd8cdb8f04cc
parentcb4431cc002780b911cf2910b039023e3225586e (diff)
parentaff2de9293853535a84428f88e9e1d569349b6f9 (diff)
downloadextras-e7b09fb10dc6cf22852c8daf6ae4ce1614d8e71f.tar.gz
Snap for 6583806 from aff2de9293853535a84428f88e9e1d569349b6f9 to mainline-releaseandroid-mainline-11.0.0_r1
Change-Id: I8ea26c64016257d2009a091fbe614c6d80d4d19e
-rwxr-xr-xboottime_tools/bootanalyze/bootanalyze.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/boottime_tools/bootanalyze/bootanalyze.py b/boottime_tools/bootanalyze/bootanalyze.py
index 095f8995..ef5c5273 100755
--- a/boottime_tools/bootanalyze/bootanalyze.py
+++ b/boottime_tools/bootanalyze/bootanalyze.py
@@ -357,7 +357,7 @@ def iterate(args, search_events_pattern, timings_pattern, shutdown_events_patter
v = v + time_correction_delta
debug("correcting event to event[{0}, {1}]".format(k, v))
- if not logcat_event_time.get(KERNEL_TIME_KEY):
+ if logcat_event_time.get(KERNEL_TIME_KEY) is None:
print "kernel time not captured in logcat, cannot get time diff"
return None, None, None, None, None, None
diffs = []
@@ -597,7 +597,7 @@ def collect_logcat_for_shutdown(capture_log_on_error, shutdown_events_pattern,\
if not event:
continue
time = extract_a_time(line, TIME_LOGCAT, float)
- if not time:
+ if time is None:
print "cannot get time from: " + line
continue
if shutdown_start_time == 0:
@@ -740,7 +740,7 @@ def extract_time(events, pattern, date_transform_function):
result = collections.OrderedDict()
for event, data in events.iteritems():
time = extract_a_time(data, pattern, date_transform_function)
- if time:
+ if time is not None:
result[event] = time
else:
print "Failed to find time for event: ", event, data