Sandro Bonazzola has uploaded a new change for review.

Change subject: network: firewalld: avoid error if not available
......................................................................

network: firewalld: avoid error if not available

check if the service is available before checking
firewall-cmd version.

Change-Id: I6a2617b7b2313e267096ba0b6e878530c97a058e
Signed-off-by: Sandro Bonazzola <[email protected]>
---
M src/plugins/otopi/network/firewalld.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/otopi refs/changes/97/16397/1

diff --git a/src/plugins/otopi/network/firewalld.py 
b/src/plugins/otopi/network/firewalld.py
index faaebc9..2078ff8 100644
--- a/src/plugins/otopi/network/firewalld.py
+++ b/src/plugins/otopi/network/firewalld.py
@@ -139,7 +139,8 @@
         priority=plugin.Stages.PRIORITY_FIRST,
     )
     def _customization(self):
-        self._firewalld_version = self._get_firewalld_cmd_version()
+        if self.services.exists('firewalld'):
+            self._firewalld_version = self._get_firewalld_cmd_version()
         self._enabled = self.environment[
             constants.NetEnv.FIREWALLD_AVAILABLE
         ] = (


-- 
To view, visit http://gerrit.ovirt.org/16397
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a2617b7b2313e267096ba0b6e878530c97a058e
Gerrit-PatchSet: 1
Gerrit-Project: otopi
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to