Bug fix for a Bug Fix test_my_prompt_custom_script.py

Changed the checks for `state.skippped` due to a bad interaction with `excluded_keywords` . It was possible for a user to cause a `job_no` calculation error if the `skipped` command was called when an `excluded_keyword` job should be skipped. This fixes it so that the user cannot cause a calculation error using the `skipped` command by incrementing the `excluded_jobs` count when a excluded keyword is present.
This commit is contained in:
Smirking Kitsune
2024-05-22 00:09:39 -07:00
committed by GitHub
parent 92170783c5
commit b775eb56cf

View File

@@ -82,6 +82,8 @@ class Script(scripts.Script):
if state.skipped:
print("Job skipped.")
state.skipped = False
if f >= 0 and prompt_array[f].strip() in excluded_keywords_list:
exluded_jobs = exluded_jobs + 1
continue
# Check for excluded keywords