Skip to content

Commit

Permalink
Hack around double long list print issue..
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Jul 12, 2022
1 parent 6ab81cf commit e1a981d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tractor/_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,8 +711,13 @@ def do_cancel():
# https://github.com/prompt-toolkit/python-prompt-toolkit/blob/c2c6af8a0308f9e5d7c0e28cb8a02963fe0ce07a/prompt_toolkit/patch_stdout.py

try:
pdb_obj.do_longlist(None)
print(pdb_obj.prompt, end='', flush=True)
# XXX: lol, see ``pdbpp`` issue:
# https://github.com/pdbpp/pdbpp/issues/496
# pdb_obj.do_longlist(None)
# pdb_obj.lastcmd = 'longlist'
pdb_obj._printlonglist(max_lines=False)
# print(pdb_obj.prompt, end='', flush=True)

except AttributeError:
log.exception('pdbpp longlist failed...')
raise KeyboardInterrupt
Expand Down

0 comments on commit e1a981d

Please sign in to comment.