fix crash on second prompt #636

This commit is contained in:
Lincoln Stein
2022-09-17 00:57:35 -04:00
parent 994c6b7512
commit b89aadb3c9
3 changed files with 14 additions and 13 deletions

View File

@ -132,10 +132,7 @@ def main_loop(gen, opt, infile):
): # in case a stored prompt still contains the !dream command
command.replace('!dream','',1)
try:
parser = opt.parse_cmd(command)
except SystemExit:
parser.print_help()
if opt.parse_cmd(command) is None:
continue
if len(opt.prompt) == 0:
print('\nTry again with a prompt!')