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

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

Issue 1914113002: [Findit] Enable project classifier and component classifier (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 4 years, 7 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/fracas.py ('k') | appengine/findit/crash/project_classifier.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/crash/fracas_parser.py
diff --git a/appengine/findit/crash/fracas_parser.py b/appengine/findit/crash/fracas_parser.py
index 8a0abe2c272f5d19ca627a851666ab9b16e4f9c3..dcb85978f99cde2dffc2cbaf1a99212da817ebd2 100644
--- a/appengine/findit/crash/fracas_parser.py
+++ b/appengine/findit/crash/fracas_parser.py
@@ -14,15 +14,12 @@ from crash.type_enums import CallStackFormatType
FRACAS_CALLSTACK_START_PATTERN = re.compile(r'CRASHED \[(.*) @ 0x(.*)\]')
-_INFINITY_PRIORITY = 1000
-
-
class FracasParser(StacktraceParser):
def Parse(self, stacktrace_string, deps, signature=None):
"""Parse fracas stacktrace string into Stacktrace instance."""
- stacktrace = Stacktrace(signature=signature)
- callstack = CallStack(_INFINITY_PRIORITY)
+ stacktrace = Stacktrace()
+ callstack = CallStack(float('inf'))
for line in stacktrace_string.splitlines():
is_new_callstack, stack_priority, format_type = (
@@ -31,14 +28,14 @@ class FracasParser(StacktraceParser):
if is_new_callstack:
# If the callstack is not the initial one or empty, add it
# to stacktrace.
- if callstack.priority != _INFINITY_PRIORITY and callstack:
+ if callstack.priority != float('inf') and callstack:
stacktrace.append(callstack)
callstack = CallStack(stack_priority, format_type)
else:
callstack.ParseLine(line, deps)
- if callstack.priority != _INFINITY_PRIORITY and callstack:
+ if callstack.priority != float('inf') and callstack:
stacktrace.append(callstack)
# Filter all the frames before signature frame.
« no previous file with comments | « appengine/findit/crash/fracas.py ('k') | appengine/findit/crash/project_classifier.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698