Temporarily use crash handler around search CLI ep

distribute_dis
Tyler Goodlet 2023-09-29 14:02:17 -04:00
parent a98f5877bc
commit b6ac6069fe
2 changed files with 19 additions and 13 deletions

View File

@ -482,20 +482,22 @@ def search(
):
return await func()
quotes = trio.run(
main,
partial(
core.symbol_search,
brokermods,
pattern,
),
)
from cornerboi._debug import open_crash_handler
with open_crash_handler():
quotes = trio.run(
main,
partial(
core.symbol_search,
brokermods,
pattern,
),
)
if not quotes:
log.error(f"No matches could be found for {pattern}?")
return
if not quotes:
log.error(f"No matches could be found for {pattern}?")
return
click.echo(colorize_json(quotes))
click.echo(colorize_json(quotes))
@cli.command()

View File

@ -145,7 +145,11 @@ async def symbol_search(
async with maybe_spawn_brokerd(
mod.name,
infect_asyncio=getattr(mod, '_infect_asyncio', False),
infect_asyncio=getattr(
mod,
'_infect_asyncio',
False,
),
) as portal:
results.append((