Skip to content

Commit

Permalink
Merge pull request #12848 from meeseeksmachine/auto-backport-of-pr-12…
Browse files Browse the repository at this point in the history
…844-on-7.x

Backport PR #12844 on branch 7.x (Fix UnboundLocalError in IPDB when running 'context' command without argument)
  • Loading branch information
Carreau committed Mar 14, 2021
2 parents 2388d0a + 31ca45a commit a76b701
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion IPython/core/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,9 +805,9 @@ def do_context(self, context):
new_context = int(context)
if new_context <= 0:
raise ValueError()
self.context = new_context
except ValueError:
self.error("The 'context' command requires a positive integer argument.")
self.context = new_context


class InterruptiblePdb(Pdb):
Expand Down

0 comments on commit a76b701

Please sign in to comment.