mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-07-22 11:59:33 +00:00
firewall: Fix 500 error when firewalld is not running (Closes: #748)
- Added one more condition to check whether the output is empty or not
This commit is contained in:
parent
fab423e652
commit
2406b144fa
@ -65,7 +65,10 @@ def setup(helper, old_version=None):
|
||||
def get_enabled_status():
|
||||
"""Return whether firewall is enabled"""
|
||||
output = _run(['get-status'], superuser=True)
|
||||
return output.split()[0] == 'running'
|
||||
if not output:
|
||||
return False
|
||||
else:
|
||||
return output.split()[0] == 'running'
|
||||
|
||||
|
||||
def get_enabled_services(zone):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user