Snap for 6582636 from 9f0e7264b2c7cd7f20c7ce559e1692b93c67a430 to rvc-release
Change-Id: Ia633872d63a12c43ee6d492eee2aea252ddbc827
diff --git a/boottime_tools/bootanalyze/bootanalyze.py b/boottime_tools/bootanalyze/bootanalyze.py
index 095f899..ef5c527 100755
--- a/boottime_tools/bootanalyze/bootanalyze.py
+++ b/boottime_tools/bootanalyze/bootanalyze.py
@@ -357,7 +357,7 @@
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 @@
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 @@
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