Skip to content

Commit

Permalink
ensure that cards check are running also on timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviermattelaer committed Jul 20, 2023
1 parent 82bc302 commit b8c78ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion madgraph/interface/common_run_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -6572,7 +6572,7 @@ def reask(self, *args, **opt):
fail_due_to_format = 0 #parameter to avoid infinite loop
def postcmd(self, stop, line):

if line not in [None, '0', 'done', '']:
if line not in [None, '0', 'done', '',0]:
ending_question = cmd.OneLinePathCompletion.postcmd(self,stop,line)
else:
ending_question = True
Expand Down
5 changes: 4 additions & 1 deletion madgraph/interface/extended_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1108,9 +1108,12 @@ def ask(self, question, default, choices=[], path_msg=None,
if alias:
choices += list(alias.keys())



question_instance = obj(question, allow_arg=choices, default=default,
mother_interface=self, **opt)

if fct_timeout is None:
fct_timeout = lambda x: question_instance.postcmd(x, default) if x else False
if first_cmd:
if isinstance(first_cmd, str):
question_instance.onecmd(first_cmd)
Expand Down

0 comments on commit b8c78ff

Please sign in to comment.