From 339f3e52c80e0859f6e87bba794a3aa9b862a673 Mon Sep 17 00:00:00 2001 From: Roopa Prabhu Date: Mon, 26 Oct 2015 08:46:22 -0700 Subject: [PATCH] bridgeutils: build cache only if bridge-utils is installed --- ifupdownaddons/bridgeutils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ifupdownaddons/bridgeutils.py b/ifupdownaddons/bridgeutils.py index 02d6363..19be566 100644 --- a/ifupdownaddons/bridgeutils.py +++ b/ifupdownaddons/bridgeutils.py @@ -20,9 +20,9 @@ class brctl(utilsBase): def __init__(self, *args, **kargs): utilsBase.__init__(self, *args, **kargs) if self.CACHE and not brctl._cache_fill_done: - self._bridge_fill() - brctl._cache_fill_done = True - + if os.path.exists('/sbin/brctl'): + self._bridge_fill() + self._cache_fill_done = True def _bridge_get_mcattrs_from_sysfs(self, bridgename): mcattrs = {}