Check to make sure the firewalld client is connected before proceeding.

Fixes #1138

Original patch referenced in https://github.com/ansible/ansible/issues/6911 ( f547733b1f ) was undone by 6f2b61d2d8
pull/18777/head
Björn Lichtblau 9 years ago committed by Matt Clay
parent 17e9b85228
commit f9383cb8ef

@ -98,6 +98,9 @@ try:
from firewall.client import Rich_Rule from firewall.client import Rich_Rule
from firewall.client import FirewallClient from firewall.client import FirewallClient
fw = FirewallClient() fw = FirewallClient()
if not fw.connected:
HAS_FIREWALLD = False
else:
HAS_FIREWALLD = True HAS_FIREWALLD = True
except ImportError: except ImportError:
HAS_FIREWALLD = False HAS_FIREWALLD = False

Loading…
Cancel
Save