diff --git a/addons/hw_drivers/tools/helpers.py b/addons/hw_drivers/tools/helpers.py index b50a5a30ef9..3254e179e38 100644 --- a/addons/hw_drivers/tools/helpers.py +++ b/addons/hw_drivers/tools/helpers.py @@ -146,7 +146,7 @@ def get_mac_address(): return netifaces.ifaddresses('wlan0')[netifaces.AF_LINK][0]['addr'] def get_ssid(): - ap = subprocess.call(['systemctl', 'is-active', 'hostapd']) # if service is active return 0 else inactive + ap = subprocess.call(['systemctl', 'is-active', '--quiet', 'hostapd']) # if service is active return 0 else inactive if not ap: return subprocess.check_output(['grep', '-oP', '(?<=ssid=).*', '/etc/hostapd/hostapd.conf']).decode('utf-8').rstrip() process_iwconfig = subprocess.Popen(['iwconfig'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) @@ -154,7 +154,7 @@ def get_ssid(): return subprocess.check_output(['sed', 's/.*"\\(.*\\)"/\\1/'], stdin=process_grep.stdout).decode('utf-8').rstrip() def get_odoo_server_url(): - ap = subprocess.call(['systemctl', 'is-active', 'hostapd']) # if service is active return 0 else inactive + ap = subprocess.call(['systemctl', 'is-active', '--quiet', 'hostapd']) # if service is active return 0 else inactive if not ap: return False return read_file_first_line('odoo-remote-server.conf')