Follow-up from #2 (uninstall success by exit status, netork#267).
install_package still decides success by searching the output of ... || true commands for keywords — the pattern #2 replaced for uninstall_package. It should use _sudo_status and the exit status the same way.
Related, found at the same time:
napalm_linux/linux.py does not pass ruff or mypy: ~45 ruff / ~41 mypy findings, almost all F821 undefined Dict/List/Optional in annotations (e.g. lines 452, 600, 723, 958, 1167, 1280, 2024, 2405; works at runtime only because of from __future__ import annotations), plus F841 (~1392), F541 (~2255) and implicit-Optional at 768/771.
Contract mismatch: napalm_device_types/packages.py documents uninstall_package(name) -> None raising on failure, while the Linux, OpenWrt and OPNsense drivers and netOrk's adapter base (netork/adapters/napalm/base.py:119) return {"success", "output"}.
Follow-up from #2 (uninstall success by exit status, netork#267).
`install_package` still decides success by searching the output of `... || true` commands for keywords — the pattern #2 replaced for `uninstall_package`. It should use `_sudo_status` and the exit status the same way.
Related, found at the same time:
- `napalm_linux/linux.py` does not pass ruff or mypy: ~45 ruff / ~41 mypy findings, almost all F821 undefined `Dict`/`List`/`Optional` in annotations (e.g. lines 452, 600, 723, 958, 1167, 1280, 2024, 2405; works at runtime only because of `from __future__ import annotations`), plus F841 (~1392), F541 (~2255) and implicit-Optional at 768/771.
- Contract mismatch: `napalm_device_types/packages.py` documents `uninstall_package(name) -> None` raising on failure, while the Linux, OpenWrt and OPNsense drivers and netOrk's adapter base (`netork/adapters/napalm/base.py:119`) return `{"success", "output"}`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Follow-up from #2 (uninstall success by exit status, netork#267).
install_packagestill decides success by searching the output of... || truecommands for keywords — the pattern #2 replaced foruninstall_package. It should use_sudo_statusand the exit status the same way.Related, found at the same time:
napalm_linux/linux.pydoes not pass ruff or mypy: ~45 ruff / ~41 mypy findings, almost all F821 undefinedDict/List/Optionalin annotations (e.g. lines 452, 600, 723, 958, 1167, 1280, 2024, 2405; works at runtime only because offrom __future__ import annotations), plus F841 (~1392), F541 (~2255) and implicit-Optional at 768/771.napalm_device_types/packages.pydocumentsuninstall_package(name) -> Noneraising on failure, while the Linux, OpenWrt and OPNsense drivers and netOrk's adapter base (netork/adapters/napalm/base.py:119) return{"success", "output"}.