From 7ff0cef719110805de8d0fdeba4fc17c51e30d8a Mon Sep 17 00:00:00 2001 From: Ettore Simone Date: Tue, 10 Sep 2024 12:16:31 +0200 Subject: [PATCH] Fix extended flags representation --- iproute4mac/ifconfig.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/iproute4mac/ifconfig.py b/iproute4mac/ifconfig.py index b12b3f3..84dbd3c 100644 --- a/iproute4mac/ifconfig.py +++ b/iproute4mac/ifconfig.py @@ -341,7 +341,7 @@ def __init__(self, text): "bond": _reBond(self._bond, text).data, **_reDict(self._generation_id, text).data, **_reDict(self._type, text).data, - "link_type": None, + "link_type": "none", "agent": _reList(self._agent, text).data, "link_quality": _reDict(self._link_quality, text).data, "state_availability": _reDict(self._state_availability, text).data, @@ -541,11 +541,11 @@ def __init__(self, text): "link": None, # async __update__ with self._get_link() "ifname": self._name, "flags": self._ifconfig["flags"], - "eflags": self._ifconfig.get("eflags"), - "xflags": self._ifconfig.get("xflags"), - "options": self._ifconfig.get("options"), - "capabilities": self._ifconfig.get("capabilities"), - "hwassist": self._ifconfig.get("hwassist"), + "eflags": self._ifconfig.get("eflags", {}).get("flags"), + "xflags": self._ifconfig.get("xflags", {}).get("flags"), + "options": self._ifconfig.get("options", {}).get("flags"), + "capabilities": self._ifconfig.get("capabilities", {}).get("flags"), + "hwassist": self._ifconfig.get("hwassist", {}).get("flags"), "mtu": self._ifconfig["mtu"], # "qdisc": "noqueue", "master": None, # async __update__ with self._get_master()