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

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: Address comments. 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
Index: appengine/findit/crash/fracas_parser.py
diff --git a/appengine/findit/crash/fracas_parser.py b/appengine/findit/crash/fracas_parser.py
index 51945713cc66003792e65786fbb0dd5b228ebe83..5c110551f0bdb27d2299b047f524d8860bad9adb 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()
- callstack = CallStack(_INFINITY_PRIORITY)
+ 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.

Powered by Google App Engine
This is Rietveld 408576698