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

Unified Diff: appengine/findit/crash/flag_manager.py

Issue 2610763002: [Predator] Pass flags to callstack detector and fix nit. (Closed)
Patch Set: . Created 3 years, 12 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 | « appengine/findit/crash/clusterfuzz_parser.py ('k') | appengine/findit/crash/test/flag_manager_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/crash/flag_manager.py
diff --git a/appengine/findit/crash/flag_manager.py b/appengine/findit/crash/flag_manager.py
index 8cd3009e5450030c2df4722a70b381062da6cad2..77916ab480566809ad019cd9c3bd78244cb2a0d7 100644
--- a/appengine/findit/crash/flag_manager.py
+++ b/appengine/findit/crash/flag_manager.py
@@ -57,7 +57,7 @@ class ParsingFlag(object):
value (bool): Initial value of the flag.
"""
self._name = name
- self._turn_on_condition = turn_on_condition
+ self._turn_on_condition = turn_on_condition or (lambda _: False)
self._value = value
@property
@@ -81,8 +81,7 @@ class ParsingFlag(object):
def ConditionallyTurnOn(self, line):
"""When the flag is off, turns on it if turn_on_conditions met."""
- if (not self._value and self._turn_on_condition and
- self._turn_on_condition(line)):
+ if not self._value and self._turn_on_condition(line):
self.TurnOn()
« no previous file with comments | « appengine/findit/crash/clusterfuzz_parser.py ('k') | appengine/findit/crash/test/flag_manager_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698