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,7 +98,10 @@ try:
from firewall.client import Rich_Rule
from firewall.client import FirewallClient
fw = FirewallClient()
HAS_FIREWALLD = True
if not fw.connected:
HAS_FIREWALLD = False
else:
HAS_FIREWALLD = True
except ImportError:
HAS_FIREWALLD = False

Loading…
Cancel
Save