From 18c525d2f1d300468705b647e680fe4334a04371 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 27 Jun 2022 16:21:32 -0400 Subject: [PATCH] Hack around double long list print issue.. See https://github.com/pdbpp/pdbpp/issues/496 --- tractor/_debug.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tractor/_debug.py b/tractor/_debug.py index 6234a27..38fe58c 100644 --- a/tractor/_debug.py +++ b/tractor/_debug.py @@ -711,8 +711,13 @@ def shield_sigint( # 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