Enable Ruff TRY201 (#114269)
* Enable Ruff TRY201 * remove redundant rules
This commit is contained in:
parent
071c3abb69
commit
f7b7f74d10
36 changed files with 71 additions and 66 deletions
|
@ -240,16 +240,16 @@ async def trace_action(
|
|||
yield trace_element
|
||||
except _AbortScript as ex:
|
||||
trace_element.set_error(ex.__cause__ or ex)
|
||||
raise ex
|
||||
except _ConditionFail as ex:
|
||||
raise
|
||||
except _ConditionFail:
|
||||
# Clear errors which may have been set when evaluating the condition
|
||||
trace_element.set_error(None)
|
||||
raise ex
|
||||
except _StopScript as ex:
|
||||
raise ex
|
||||
raise
|
||||
except _StopScript:
|
||||
raise
|
||||
except Exception as ex:
|
||||
trace_element.set_error(ex)
|
||||
raise ex
|
||||
raise
|
||||
finally:
|
||||
trace_stack_pop(trace_stack_cv)
|
||||
|
||||
|
@ -469,7 +469,7 @@ class _ScriptRun:
|
|||
if not self._script.top_level:
|
||||
# We already consumed the response, do not pass it on
|
||||
err.response = None
|
||||
raise err
|
||||
raise
|
||||
except Exception:
|
||||
script_execution_set("error")
|
||||
raise
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue