handle exception when exiting cmd mode
This commit is contained in:
@@ -30,7 +30,10 @@ def init_argparse():
|
|||||||
def command_line():
|
def command_line():
|
||||||
# TODO (extra): implement command line mode for manually controlling the bot
|
# TODO (extra): implement command line mode for manually controlling the bot
|
||||||
print('Here\'s a Python interpretor.')
|
print('Here\'s a Python interpretor.')
|
||||||
|
try:
|
||||||
code.interact(local=globals())
|
code.interact(local=globals())
|
||||||
|
except SystemExit:
|
||||||
|
pass
|
||||||
|
|
||||||
async def async_main():
|
async def async_main():
|
||||||
global PROGRAM_ARGS
|
global PROGRAM_ARGS
|
||||||
|
|||||||
Reference in New Issue
Block a user