m1n1.shell: Don't save history if init failed

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
This commit is contained in:
Akihiko Odaki 2022-04-18 20:05:02 +09:00 committed by Hector Martin
parent 3440aadc3c
commit 4a67fbe10e

View file

@ -188,8 +188,8 @@ def run_shell(locals, msg=None, exitmsg=None):
if isinstance(clist, dict):
clist[obj_name] = desc
con = HistoryConsole(locals)
try:
con = HistoryConsole(locals)
con.interact(msg, exitmsg)
except ExitConsole as e:
if len(e.args):