| OLD | NEW |
| (Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import os |
| 6 import sys |
| 7 |
| 8 from crash_queries import crash_iterator |
| 9 |
| 10 CRASH_INFO_FIELDS = ['signature', 'platform'] |
| 11 |
| 12 |
| 13 def PrintCrashInfo(crash): |
| 14 print '\nCrash %s' % crash['id'] |
| 15 for crash_info_field in CRASH_INFO_FIELDS: |
| 16 print '%s: %s' % (crash_info_field, crash[crash_info_field]) |
| 17 |
| 18 |
| 19 def CrashPrinter(client_id, app_id, |
| 20 start_date, end_date, |
| 21 print_func=PrintCrashInfo): |
| 22 for crash in crash_iterator.IterateCrashes(client_id, app_id, |
| 23 fields=CRASH_INFO_FIELDS, |
| 24 start_date=start_date, |
| 25 end_date=end_date): |
| 26 print_func(crash) |
| OLD | NEW |