Skip to content

Commit

Permalink
Change indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrebarbaruiva authored and gotcha committed Jun 23, 2020
1 parent ede7370 commit 4822308
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions ipdb/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,18 @@ def wrap_sys_excepthook():


def set_trace(frame=None, context=None, cond=True):
if cond:
wrap_sys_excepthook()
if not context:
context = os.environ.get(
"IPDB_CONTEXT_SIZE", get_context_from_config()
)
if frame is None:
frame = sys._getframe().f_back
p = _init_pdb(context).set_trace(frame)
if p and hasattr(p, 'shell'):
p.shell.restore_sys_module_state()
if not cond:
return
wrap_sys_excepthook()
if not context:
context = os.environ.get(
"IPDB_CONTEXT_SIZE", get_context_from_config()
)
if frame is None:
frame = sys._getframe().f_back
p = _init_pdb(context).set_trace(frame)
if p and hasattr(p, 'shell'):
p.shell.restore_sys_module_state()


def get_context_from_config():
Expand Down

0 comments on commit 4822308

Please sign in to comment.