Commit f547733b by James Cammarata

Check to make sure the firewalld client is connected before proceeding

Fixes #6911
parent d240d073
......@@ -85,8 +85,13 @@ try:
from firewall.client import FirewallClient
fw = FirewallClient()
if not fw.connected:
raise Exception('failed to connect to the firewalld daemon')
except ImportError:
print "fail=True msg='firewalld required for this module'"
print "failed=True msg='firewalld required for this module'"
sys.exit(1)
except Exception, e:
print "failed=True msg='%s'" % str(e)
sys.exit(1)
################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment