From 7102fb3cc5b6dc0788754e73e606400d7877a1a1 Mon Sep 17 00:00:00 2001 From: muskit <15199219+muskit@users.noreply.github.com> Date: Sun, 20 Aug 2023 16:04:57 -0700 Subject: [PATCH] handle exception when exiting cmd mode --- src/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index b996d38..498492a 100644 --- a/src/main.py +++ b/src/main.py @@ -30,7 +30,10 @@ def init_argparse(): def command_line(): # TODO (extra): implement command line mode for manually controlling the bot print('Here\'s a Python interpretor.') - code.interact(local=globals()) + try: + code.interact(local=globals()) + except SystemExit: + pass async def async_main(): global PROGRAM_ARGS