s110: address

This commit is contained in:
Jörg Thalheim
2025-08-20 16:28:18 +02:00
parent f3f6692e4d
commit 332d10e306
3 changed files with 4 additions and 4 deletions

View File

@@ -359,7 +359,7 @@ def complete_vars_for_machine(
var_id = f"{generator_name}/{var_name}" var_id = f"{generator_name}/{var_name}"
vars_list.append(var_id) vars_list.append(var_id)
except Exception: except (OSError, PermissionError):
pass pass
vars_dict = dict.fromkeys(vars_list, "var") vars_dict = dict.fromkeys(vars_list, "var")

View File

@@ -70,7 +70,7 @@ def requires_explicit_update(m: Machine) -> bool:
try: try:
if m.select("config.clan.deployment.requireExplicitUpdate"): if m.select("config.clan.deployment.requireExplicitUpdate"):
return False return False
except Exception: except (ClanError, AttributeError):
pass pass
try: try:

View File

@@ -239,7 +239,7 @@ def test_run_exception(hosts: list[Remote], runtime: AsyncRuntime) -> None:
runtime.async_run(None, host.run_local, ["exit 1"], RunOpts(shell=True)) # noqa: S604 runtime.async_run(None, host.run_local, ["exit 1"], RunOpts(shell=True)) # noqa: S604
runtime.join_all() runtime.join_all()
runtime.check_all() runtime.check_all()
except Exception: except Exception: # noqa: S110
pass pass
else: else:
msg = "should have raised Exception" msg = "should have raised Exception"
@@ -255,7 +255,7 @@ def test_run_function_exception(hosts: list[Remote], runtime: AsyncRuntime) -> N
runtime.async_run(None, some_func, host) runtime.async_run(None, some_func, host)
runtime.join_all() runtime.join_all()
runtime.check_all() runtime.check_all()
except Exception: except Exception: # noqa: S110
pass pass
else: else:
msg = "should have raised Exception" msg = "should have raised Exception"