BLE001: fix

This commit is contained in:
Jörg Thalheim
2025-08-20 17:13:38 +02:00
parent c55b369899
commit c9a709783a
16 changed files with 49 additions and 63 deletions

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.join_all()
runtime.check_all()
except Exception: # noqa: S110
except ClanError:
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: # noqa: S110
except ClanError:
pass
else:
msg = "should have raised Exception"

View File

@@ -90,7 +90,7 @@ class SudoAskpassProxy:
ssh_process.stdin.flush()
else:
print(stripped_line)
except Exception as e:
except (OSError, ClanError) as e:
logger.error(f"Error processing passwords requests output: {e}")
def run(self) -> str: