Clean up early assignment in script response (#131691)

This commit is contained in:
Franck Nijhof 2024-11-27 10:24:06 +01:00 committed by GitHub
parent 96eae1221c
commit 56b4733e4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -473,11 +473,13 @@ class _ScriptRun:
script_execution_set("aborted")
except _StopScript as err:
script_execution_set("finished", err.response)
response = err.response
# Let the _StopScript bubble up if this is a sub-script
if not self._script.top_level:
raise
response = err.response
except Exception:
script_execution_set("error")
raise