From: Julien Fortin Date: Wed, 14 Nov 2018 20:52:45 +0000 (+0100) Subject: addons: bridge: add "None" check (string) for unsupported bridge attr on some systems X-Git-Tag: 1.2.2-1~20 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=2229ca6371b71764f5705c1c910b3a2e0c455495;p=mirror_ifupdown2.git addons: bridge: add "None" check (string) for unsupported bridge attr on some systems Signed-off-by: Julien Fortin --- diff --git a/ifupdown2/addons/bridge.py b/ifupdown2/addons/bridge.py index e51d2b4..9c1de18 100644 --- a/ifupdown2/addons/bridge.py +++ b/ifupdown2/addons/bridge.py @@ -1249,7 +1249,7 @@ class bridge(moduleBase): old_cache_key = self._ifla_br_attributes_old_cache_key_map.get(nl_attr) if old_cache_key and not link_just_created: cached_value = self.brctlcmd.link_cache_get([ifname, 'linkinfo', old_cache_key]) - if not cached_value: + if not cached_value or cached_value == "None": # the link already exists but we don't have any value # cached for this attr, it probably means that the # capability is not available on this system (i.e old kernel)