Chromium Code Reviews| 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 functools | |
| 6 import json | |
| 7 import os | |
| 8 import sys | |
| 9 import zlib | |
|
stgao
2016/10/10 23:39:40
Need clean-up
Sharu Jiang
2016/10/12 00:52:11
Done.
| |
| 10 | |
| 11 from crash.type_enums import CrashClient | |
| 12 from crash_queries import crash_iterator | |
| 13 | |
| 14 CRASH_INFO_FIELDS = ['signature', 'platform'] | |
| 15 | |
| 16 | |
| 17 def PrintCrashInfo(crash): | |
| 18 print '\nCrash %s' % crash['id'] | |
| 19 for crash_info_field in CRASH_INFO_FIELDS: | |
| 20 print '%s: %s' % (crash_info_field, crash[crash_info_field]) | |
| 21 | |
| 22 | |
| 23 def CrashPrinter(client_id, | |
| 24 start_date, end_date, | |
| 25 print_func=PrintCrashInfo): | |
| 26 for crash in crash_iterator.IterateCrashes(client_id, | |
| 27 fields=CRASH_INFO_FIELDS, | |
| 28 start_date=start_date, | |
| 29 end_date=end_date): | |
| 30 print_func(crash) | |
| OLD | NEW |