From c5f3745550ab765abb9ff775a321120cc4047a8d Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Sun, 27 Jun 2021 20:57:59 +0000 Subject: [PATCH] test.py: fix bug in direct call feature --- test/test.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/test.py b/test/test.py index db98b725..4c89763c 100755 --- a/test/test.py +++ b/test/test.py @@ -783,10 +783,8 @@ class TestSuiteRunner(object): else: if ':' in arg: gname,arg = arg.split(':') - direct_call_ok = True # allow calling of functions not in cmd_group else: gname = self.gm.find_cmd_in_groups(arg) - direct_call_ok = False if gname: same_grp = gname == gname_save # same group as previous cmd: don't clean, suppress blue msg if not self.init_group(gname,arg,quiet=same_grp): @@ -795,8 +793,8 @@ class TestSuiteRunner(object): clean(self.ts.tmpdir_nums) try: self.check_needs_rerun(arg,build=True) - except: - if direct_call_ok: + except Exception as e: # allow calling of functions not in cmd_group + if isinstance(e,KeyError) and e.args[0] == arg: ret = getattr(self.ts,arg)() if type(ret).__name__ == 'coroutine': run_session(ret)