From 2229ca6371b71764f5705c1c910b3a2e0c455495 Mon Sep 17 00:00:00 2001 From: Julien Fortin Date: Wed, 14 Nov 2018 21:52:45 +0100 Subject: [PATCH] addons: bridge: add "None" check (string) for unsupported bridge attr on some systems Signed-off-by: Julien Fortin --- ifupdown2/addons/bridge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.39.2