forked from goodboy/tractor
1
0
Fork 0

Call longlist normally when on py < 3.10

sigintsaviour_citesthackin
Tyler Goodlet 2022-07-10 20:45:43 -04:00
parent 9e56881163
commit f76c809c39
1 changed files with 7 additions and 4 deletions

View File

@ -392,7 +392,7 @@ async def wait_for_parent_stdin_hijack(
def mk_mpdb() -> tuple[MultiActorPdb, Callable]:
pdb = MultiActorPdb()
signal.signal = pdbpp.hideframe(signal.signal)
# signal.signal = pdbpp.hideframe(signal.signal)
orig_handler = signal.signal(
signal.SIGINT,
partial(shield_sigint, pdb_obj=pdb),
@ -713,10 +713,13 @@ def shield_sigint(
try:
# 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)
if sys.version_info >= (3, 10):
pdb_obj._printlonglist(False)
else:
pdb_obj.do_longlist(None)
print(pdb_obj.prompt, end='', flush=True)
except AttributeError:
log.exception('pdbpp longlist failed...')