| Index: appengine/findit/crash/findit_for_chromecrash.py
|
| diff --git a/appengine/findit/crash/findit_for_chromecrash.py b/appengine/findit/crash/findit_for_chromecrash.py
|
| index a656f27885c88968bbf0619da94b161ae99bb865..2d0c52a2cc2ca664e20b273ec2c4dd35207e9df4 100644
|
| --- a/appengine/findit/crash/findit_for_chromecrash.py
|
| +++ b/appengine/findit/crash/findit_for_chromecrash.py
|
| @@ -97,10 +97,10 @@ class Culprit(namedtuple('Culprit',
|
| # are empty; so that, in turn, we can get rid of the NullCulprit class.
|
| return (
|
| {
|
| - 'found': (bool(self.project)
|
| - or bool(self.components)
|
| - or bool(cls_list)
|
| - or bool(self.regression_range)),
|
| + 'found': (bool(self.project) or
|
| + bool(self.components) or
|
| + bool(cls_list) or
|
| + bool(self.regression_range)),
|
| 'regression_range': self.regression_range,
|
| 'suspected_project': self.project,
|
| 'suspected_components': self.components,
|
| @@ -127,11 +127,8 @@ class NullCulprit(object):
|
| result of the ToDicts method is more minimalistic."""
|
|
|
| def ToDicts(self):
|
| - return (
|
| - {'found': False},
|
| - {'found_suspects': False,
|
| - 'has_regression_range': False}
|
| - )
|
| + return {'found': False}, {'found_suspects': False,
|
| + 'has_regression_range': False}
|
|
|
|
|
| # TODO(wrengr): better name for this class. Given the "findit_for_*.py"
|
| @@ -151,7 +148,6 @@ class FinditForChromeCrash(object):
|
| on CrashConfig; thereby decoupling the analysis itself from UX concerns
|
| about deciding how to run those analyses.
|
| """
|
| -
|
| # TODO(wrengr): remove the dependency on CrashConfig entirely, by
|
| # passing the relevant data as arguments to this constructor.
|
| def __init__(self):
|
| @@ -171,11 +167,10 @@ class FinditForChromeCrash(object):
|
| # TODO(wrengr); fix ProjectClassifier so it doesn't depend on CrashConfig.
|
| self.project_classifier = ProjectClassifier()
|
|
|
| -
|
| # TODO(wrengr): since this is the only method of interest, it would
|
| # be better IMO to rename it to __call__ to reduce verbosity.
|
| def FindCulprit(self, signature, platform, stack_trace, crashed_version,
|
| - historic_metadata):
|
| + regression_range):
|
| """Finds culprits for a Chrome crash.
|
|
|
| Args:
|
| @@ -184,8 +179,7 @@ class FinditForChromeCrash(object):
|
| 'android', 'ios', etc.
|
| stack_trace (str): A string containing the stack trace of a crash.
|
| crashed_version (str): The version of Chrome in which the crash occurred.
|
| - historic_metadata (list): list of dicts mapping from Chrome version to
|
| - historic metadata.
|
| + regression_range (list or None): [good_version, bad_revision] or None.
|
|
|
| Returns:
|
| A Culprit object.
|
| @@ -199,8 +193,6 @@ class FinditForChromeCrash(object):
|
|
|
| # Get regression deps and crash deps.
|
| regression_deps_rolls = {}
|
| - regression_range = detect_regression_range.DetectRegressionRange(
|
| - historic_metadata)
|
| if regression_range:
|
| last_good_version, first_bad_version = regression_range
|
| logging.info('Find regression range %s:%s', last_good_version,
|
|
|