OSDN Git Service

Btsnooz doesn't find snooplog sometimes
authorAjay Panicker <apanicke@google.com>
Tue, 1 Mar 2016 00:44:28 +0000 (16:44 -0800)
committerAjay Panicker <apanicke@google.com>
Wed, 2 Mar 2016 22:19:31 +0000 (14:19 -0800)
In the bugreport in b/27274486 comment #11, the line indicating the
beginning of BTSNOOP LOGS was slightly indented thus causing btsnooz
to not find the beginning of the log.

Bug: 27419027
Change-Id: I3b88e6a3f6f2d6c4d3cbbadb0a93cbd7965f56c8

tools/scripts/btsnooz.py

index af4708d..4d85081 100755 (executable)
@@ -147,7 +147,7 @@ def main():
 
   iterator = fileinput.input()
   for line in iterator:
-    if line.startswith('--- BEGIN:BTSNOOP_LOG_SUMMARY'):
+    if line.find('--- BEGIN:BTSNOOP_LOG_SUMMARY') != -1:
       decode_snooz(base64.standard_b64decode(iterator.next()))
       sys.exit(0)
   sys.stderr.write('No btsnooz section found in bugreport.\n');