From 7fa664d4458a96543e7d481a494d416847c4d62d Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 4 Nov 2024 10:16:12 -0800 Subject: [PATCH] networks: Fix display of mangled SSIDs when scanning Wi-Fi networks In the list of Wi-Fi networks shown after scanning, the SSID shows as "b'myap'" instead of "myap". Fix this. Tests: - On a machine with Wi-Fi network device, scan of Wi-Fi networks. Without the patch, incorrect SSID labels show up. With patch, SSID is correct. Signed-off-by: Sunil Mohan Adapa Reviewed-by: Veiko Aasa --- plinth/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plinth/network.py b/plinth/network.py index 43dcb0399..3bb0000c8 100644 --- a/plinth/network.py +++ b/plinth/network.py @@ -626,7 +626,7 @@ def wifi_scan(): # this is used in the URL it will be escaped properly and # unescaped when taken as view function's argument. ssid = access_point.get_ssid() - ssid_string = ssid.get_data() if ssid else '' + ssid_string = ssid.get_data().decode() if ssid else '' access_points.append({ 'interface_name': device.get_iface(), 'ssid': ssid_string,