fix: silence stderr when checking for ufw on debian systems

Closes #4710
This commit is contained in:
Jose Diaz-Gonzalez
2021-08-05 23:49:37 -04:00
parent bdc89e5907
commit 79f181cd55

View File

@@ -62,7 +62,7 @@ if os.path.isfile(key_file):
ufw_display = 'block'
try:
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:
ufw_display = 'none'
except subprocess.CalledProcessError: