base.pyget_listening_sockets: when the privileged read fails, the fallback runs without root and parses plain.stdout without looking at plain.exit_code. A failing sockstat/netstat therefore returns {"attributed": False, "sockets": []}, which a caller reads as "every port closed". napalm-device-types' ListeningSocketsMixin raises in that case ("a list cut short must never read as sockets that closed").
Fix: raise when the fallback exits non-zero, and add a test.
Part of NetOrk/netork#1105. Plan: NAPALM/napalm-device-types docs/STRUCTURE.md (branch docs/structure-plan).
Prio P3.
`base.py` `get_listening_sockets`: when the privileged read fails, the fallback runs without root and parses `plain.stdout` without looking at `plain.exit_code`. A failing `sockstat`/`netstat` therefore returns `{"attributed": False, "sockets": []}`, which a caller reads as "every port closed". napalm-device-types' `ListeningSocketsMixin` raises in that case ("a list cut short must never read as sockets that closed").
Fix: raise when the fallback exits non-zero, and add a test.
Part of NetOrk/netork#1105. Plan: NAPALM/napalm-device-types `docs/STRUCTURE.md` (branch `docs/structure-plan`).
Prio P3.
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.
base.pyget_listening_sockets: when the privileged read fails, the fallback runs without root and parsesplain.stdoutwithout looking atplain.exit_code. A failingsockstat/netstattherefore returns{"attributed": False, "sockets": []}, which a caller reads as "every port closed". napalm-device-types'ListeningSocketsMixinraises in that case ("a list cut short must never read as sockets that closed").Fix: raise when the fallback exits non-zero, and add a test.
Part of NetOrk/netork#1105. Plan: NAPALM/napalm-device-types
docs/STRUCTURE.md(branchdocs/structure-plan).Prio P3.