New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop script if sub-script stops or aborts #71195
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @emontnemery 馃憤
Is this not a breaking change? Certainly some people could be accidentally or even deliberately relying on existing aborts not bubbling up. And in one case I think the current behavior is documented:
But the condition action looks to work by raising Perhaps I am missing something though. I'm only reading the code, not actually testing this change out. |
But I'm talking about condition as an action type within a choose branch or within a loop. https://www.home-assistant.io/docs/scripts/#test-a-condition The condition action step looks to be turning failed conditions or ConditionErrors into an abort: core/homeassistant/helpers/script.py Lines 711 to 729 in d6ff476
|
Meh that looks like a totally different bug in that case. |
Are the conditions of the loop actually treated as action steps? Or just evaluated more directly? In any case be 100% clear about the case I am referring to, I'm talking about scripts like this one which should make the left light blink at twice the rate of the right light. I've hand typed this, so i may have messed something up.
The condition failing is like a But the same concept also applies to choose statements. where the conditional failing would act sort-of like a |
@KevinCathcart #71235 makes sure a failing condition in a sub-script does not bubble up and stops the parent. |
Proposed change
Stop script if sub-script stops or aborts
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: