Skip to content

Commit

Permalink
Fix TypeError in NetCommandFactoryJson.make_get_thread_stack_message() (
Browse files Browse the repository at this point in the history
#928)

Set startFrame and levels to 0 if None to avoid TypeError
  • Loading branch information
jgru authored May 19, 2022
1 parent 0a40cab commit 78b030f
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -944,8 +944,16 @@ def on_stacktrace_request(self, py_db, request):
# : :type stack_trace_arguments: StackTraceArguments
stack_trace_arguments = request.arguments
thread_id = stack_trace_arguments.threadId
start_frame = stack_trace_arguments.startFrame
levels = stack_trace_arguments.levels

if stack_trace_arguments.startFrame:
start_frame = int(stack_trace_arguments.startFrame)
else:
start_frame = 0

if stack_trace_arguments.levels:
levels = int(stack_trace_arguments.levels)
else:
levels = 0

fmt = stack_trace_arguments.format
if hasattr(fmt, 'to_dict'):
Expand Down

0 comments on commit 78b030f

Please sign in to comment.