mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 00:56:44 +01:00
SERVER-28614 Make mongosymb.py ignore everything before the opening brace
This commit is contained in:
parent
80d05e9359
commit
269a1e81c9
@ -173,8 +173,15 @@ def main(argv):
|
||||
sys.stderr.write("Invalid output-format argument: %s\n" % options.output_format)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
# Skip over everything before the first '{' since it is likely to be log line prefixes.
|
||||
# Additionally, using raw_decode() to ignore extra data after the closing '}' to allow maximal
|
||||
# sloppiness in copy-pasting input.
|
||||
trace_doc = sys.stdin.read()
|
||||
trace_doc = trace_doc[trace_doc.find('{'):]
|
||||
trace_doc = json.JSONDecoder().raw_decode(trace_doc)[0]
|
||||
|
||||
resolver = resolver_constructor(*args[1:])
|
||||
trace_doc = json.load(sys.stdin)
|
||||
frames = symbolize_frames(trace_doc,
|
||||
resolver,
|
||||
symbolizer_path=options.symbolizer_path,
|
||||
|
Loading…
Reference in New Issue
Block a user