Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Unified Diff: appengine/findit/crash/loglinear/changelist_features/min_distance.py

Issue 2644543006: [Culprit-Finder] Add generator cache decorator. (Closed)
Patch Set: Rebase and fix nits. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | appengine/findit/gae_libs/gitiles/cached_gitiles_repository.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/crash/loglinear/changelist_features/min_distance.py
diff --git a/appengine/findit/crash/loglinear/changelist_features/min_distance.py b/appengine/findit/crash/loglinear/changelist_features/min_distance.py
index 480cf8961c120ad78813103382e8e11d0b78999f..4f985a45bd07391855796ab19df89d9ea37f69ad 100644
--- a/appengine/findit/crash/loglinear/changelist_features/min_distance.py
+++ b/appengine/findit/crash/loglinear/changelist_features/min_distance.py
@@ -73,7 +73,9 @@ class MinDistanceFeature(Feature):
return FeatureValue(
name = self.name,
value = LogLinearlyScaled(float(min_distance), float(self._maximum)),
- reason = ('Minimum distance is %d' % min_distance),
+ reason = ('Minimum distance is %d' % min_distance
+ if not math.isinf(min_distance) else
+ 'Minimum distance is infinity'),
changed_files = self._ChangedFiles(suspect),
)
« no previous file with comments | « no previous file | appengine/findit/gae_libs/gitiles/cached_gitiles_repository.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698