Merge pull request #1133 from lightblu/devel
Check to make sure the firewalld client is connected before proceeding
This commit is contained in:
commit
174bef08ae
1 changed files with 4 additions and 1 deletions
|
@ -99,7 +99,10 @@ 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()
|
||||||
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…
Reference in a new issue