summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-06-12 01:11:05 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-06-12 01:11:05 +0000
commit146821bd3e90741bf768c483c9290ae31f95c676 (patch)
tree9bdde6355d276697a5c4501567f0dd8cdb8f04cc
parentce8b6bd86f096594b70b7b5cd26dccadd467e6ee (diff)
parent4f61898bd266f3c415c4f907f33b9f607a226b81 (diff)
downloadextras-146821bd3e90741bf768c483c9290ae31f95c676.tar.gz
Snap for 6582601 from 4f61898bd266f3c415c4f907f33b9f607a226b81 to rvc-d1-release
Change-Id: I4ff28ec77ff10c4d778190d878e580d8156f4896
-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