Skip to content

Commit

Permalink
Rename _stacktrace_long by _stacktrace_extra
Browse files Browse the repository at this point in the history
  • Loading branch information
drew2a committed Jan 25, 2021
1 parent d80b893 commit b1bc3fc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def send_event(event, post_data=None, sys_info=None):

stacktrace_parts = parse_stacktrace(get_value(post_data, 'stack'))
reporter[STACKTRACE] = next(stacktrace_parts, [])
reporter[f'{STACKTRACE}_long'] = next(stacktrace_parts, [])
reporter[f'{STACKTRACE}_extra'] = next(stacktrace_parts, [])
reporter[f'{STACKTRACE}_context'] = next(stacktrace_parts, [])

reporter['comments'] = get_value(post_data, 'comments')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def parse_stacktrace(stacktrace, delimiters=None):
delimiters = ['--LONG TEXT--', '--CONTEXT--']

if not stacktrace:
return None
return

for part in re.split('|'.join(delimiters), stacktrace):
yield [line for line in re.split(r'\\n|\n', part) if line]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_send():
'reporter': {
'_stacktrace': [],
'_stacktrace_context': [],
'_stacktrace_long': [],
'_stacktrace_extra': [],
'comments': None,
OS_ENVIRON: {},
'sysinfo': {},
Expand Down Expand Up @@ -79,7 +79,7 @@ def test_send():
'reporter': {
'_stacktrace': ['l1', 'l2'],
'_stacktrace_context': [],
'_stacktrace_long': ['l3', 'l4'],
'_stacktrace_extra': ['l3', 'l4'],
'comments': 'comment',
'os.environ': {},
'sysinfo': {},
Expand All @@ -104,7 +104,7 @@ def test_send():
'reporter': {
'_stacktrace': [],
'_stacktrace_context': [],
'_stacktrace_long': [],
'_stacktrace_extra': [],
'comments': None,
OS_ENVIRON: {'KEY': 'VALUE', 'KEY1': 'VALUE1'},
'sysinfo': {'platform': ['darwin'], 'platform.details': ['details']},
Expand Down

0 comments on commit b1bc3fc

Please sign in to comment.