fix error on rpi

This commit is contained in:
hjelev
2023-02-03 22:42:13 +02:00
parent 645ee119ec
commit 5e1441cba6

View File

@@ -20,7 +20,7 @@ def check_wifi_signal(format):
try:
full_cmd = "ls /sys/class/ieee80211/*/device/net/"
interface = subprocess.Popen(full_cmd, shell=True, stdout=subprocess.PIPE).communicate()[0].strip().decode("utf-8")
full_cmd = f'/sbin/iwconfig {interface} | grep -i quality'
full_cmd = "/sbin/iwconfig {} | grep -i quality".format(interface)
wifi_signal = subprocess.Popen(full_cmd, shell=True, stdout=subprocess.PIPE).communicate()[0]
if format == 'dbm':