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
reviewable/pr18780/r1
Björn Lichtblau 9 years ago
parent 405c3cb2c7
commit c4c7e43020

@ -97,7 +97,10 @@ try:
from firewall.client import FirewallClient from firewall.client import FirewallClient
fw = FirewallClient() fw = FirewallClient()
HAS_FIREWALLD = True if not fw.connected:
HAS_FIREWALLD = False
else:
HAS_FIREWALLD = True
except ImportError: except ImportError:
HAS_FIREWALLD = False HAS_FIREWALLD = False

Loading…
Cancel
Save