Skip to content

Commit 6151d1a

Browse files
authored
Guard on_job_submit with null check for _command_gen_strategy access (#584)
1 parent bc73d05 commit 6151d1a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/cloudai/_core/base_runner.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ async def submit_test(self, tr: TestRun):
113113
exit(1)
114114

115115
def on_job_submit(self, tr: TestRun) -> None:
116-
cmd_gen = tr.test.test_template.command_gen_strategy
117-
cmd_gen.store_test_run(tr)
116+
if tr.test.test_template._command_gen_strategy is not None:
117+
cmd_gen = tr.test.test_template.command_gen_strategy
118+
cmd_gen.store_test_run(tr)
118119

119120
async def delayed_submit_test(self, tr: TestRun, delay: int = 5):
120121
"""

0 commit comments

Comments
 (0)