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
This commit is contained in:
Björn Lichtblau 2015-10-21 13:36:28 +02:00
parent 405c3cb2c7
commit c4c7e43020

View file

@ -97,7 +97,10 @@ try:
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