From 332d10e3068d5b0c65d83eeb5f020e3c9f32296d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 20 Aug 2025 16:28:18 +0200 Subject: [PATCH] s110: address --- pkgs/clan-cli/clan_cli/completions.py | 2 +- pkgs/clan-cli/clan_cli/machines/update.py | 2 +- pkgs/clan-cli/clan_lib/ssh/remote_test.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/clan-cli/clan_cli/completions.py b/pkgs/clan-cli/clan_cli/completions.py index 2f0781874..bd89eb524 100644 --- a/pkgs/clan-cli/clan_cli/completions.py +++ b/pkgs/clan-cli/clan_cli/completions.py @@ -359,7 +359,7 @@ def complete_vars_for_machine( var_id = f"{generator_name}/{var_name}" vars_list.append(var_id) - except Exception: + except (OSError, PermissionError): pass vars_dict = dict.fromkeys(vars_list, "var") diff --git a/pkgs/clan-cli/clan_cli/machines/update.py b/pkgs/clan-cli/clan_cli/machines/update.py index 53308cf76..eb274e3e6 100644 --- a/pkgs/clan-cli/clan_cli/machines/update.py +++ b/pkgs/clan-cli/clan_cli/machines/update.py @@ -70,7 +70,7 @@ def requires_explicit_update(m: Machine) -> bool: try: if m.select("config.clan.deployment.requireExplicitUpdate"): return False - except Exception: + except (ClanError, AttributeError): pass try: diff --git a/pkgs/clan-cli/clan_lib/ssh/remote_test.py b/pkgs/clan-cli/clan_lib/ssh/remote_test.py index 9c4ec3f54..62ee64753 100644 --- a/pkgs/clan-cli/clan_lib/ssh/remote_test.py +++ b/pkgs/clan-cli/clan_lib/ssh/remote_test.py @@ -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.join_all() runtime.check_all() - except Exception: + except Exception: # noqa: S110 pass else: 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.join_all() runtime.check_all() - except Exception: + except Exception: # noqa: S110 pass else: msg = "should have raised Exception"