fix: silence stderr when checking for ufw on debian systems
Closes #4710
This commit is contained in:
@@ -62,7 +62,7 @@ if os.path.isfile(key_file):
|
|||||||
ufw_display = 'block'
|
ufw_display = 'block'
|
||||||
try:
|
try:
|
||||||
command = "sudo ufw status"
|
command = "sudo ufw status"
|
||||||
ufw_output = bytes_to_string(subprocess.check_output(command, shell=True).strip())
|
ufw_output = bytes_to_string(subprocess.check_output(command, shell=True, stderr=subprocess.DEVNULL).strip())
|
||||||
if "inactive" in ufw_output:
|
if "inactive" in ufw_output:
|
||||||
ufw_display = 'none'
|
ufw_display = 'none'
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
|
|||||||
Reference in New Issue
Block a user