mirror of
https://github.com/DaanSelen/meshbook.git
synced 2026-02-20 08:22:11 +00:00
chore: catch wrong keywords better
This commit is contained in:
18
meshbook.py
18
meshbook.py
@@ -259,18 +259,22 @@ async def main():
|
||||
Console.print_text(args.silent, "Writing to file...")
|
||||
history.write_history(formatted_history)
|
||||
|
||||
await session.close()
|
||||
|
||||
except OSError as message:
|
||||
Console.print_text(args.silent,
|
||||
Console.text_color.red + f'{message}')
|
||||
Console.print_text(
|
||||
args.silent,
|
||||
Console.text_color.red + f'{message}'
|
||||
)
|
||||
|
||||
except asyncio.CancelledError:
|
||||
Console.print_text(args.silent,
|
||||
Console.text_color.red + "Received SIGINT, Aborting - (Tasks may still be running on targets).")
|
||||
await session.close()
|
||||
Console.print_text(
|
||||
args.silent,
|
||||
Console.text_color.red + "Received SIGINT, Aborting - (Tasks may still be running on targets)."
|
||||
)
|
||||
raise
|
||||
|
||||
finally:
|
||||
await session.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
asyncio.run(main())
|
||||
|
||||
Reference in New Issue
Block a user