yanger: Do not crash if fails to get ethernet links

This commit is contained in:
Mattias Walström
2026-01-09 10:23:52 +01:00
parent f307dd9779
commit 651a274470
@@ -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