From 651a274470815a1789a0dd5cee8294b41bc24ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Fri, 9 Jan 2026 10:22:49 +0100 Subject: [PATCH] yanger: Do not crash if fails to get ethernet links --- src/statd/python/yanger/ietf_interfaces/ethernet.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/statd/python/yanger/ietf_interfaces/ethernet.py b/src/statd/python/yanger/ietf_interfaces/ethernet.py index 8e3c0404..c2b3821c 100644 --- a/src/statd/python/yanger/ietf_interfaces/ethernet.py +++ b/src/statd/python/yanger/ietf_interfaces/ethernet.py @@ -89,6 +89,9 @@ def link(ifname): def ethernet(iplink): eth = link(iplink["ifname"]) + if eth is None: + eth = {} + if stats := statistics(iplink["ifname"]): eth["statistics"] = stats