luci-app-travelmate: fix wireless scan 2239/head
authorDirk Brenken <dev@brenken.org>
Sun, 21 Oct 2018 06:37:56 +0000 (08:37 +0200)
committerDirk Brenken <dev@brenken.org>
Sun, 21 Oct 2018 06:37:56 +0000 (08:37 +0200)
* fix possible crash during wireless scan
  when no valid WPA label was found

Signed-off-by: Dirk Brenken <dev@brenken.org>
applications/luci-app-travelmate/luasrc/view/travelmate/wifi_scan.htm

index ab3fe77fbc9415eb9bcd2b931ab80d9e3dfbe8fa..67568f179e19887248da00a1b5d9f50f7eb08abf 100644 (file)
@@ -18,7 +18,7 @@ This is free software, licensed under the Apache License, Version 2.0
                if info.wep == true then
                        return translate("WEP")
                elseif info.wpa > 0 then
-                       return "%s (%s/%s)" %{label[info.wpa], table.concat(info.auth_suites), table.concat(info.group_ciphers)}
+                       return "%s (%s/%s)" %{label[info.wpa] or translate("Unknown"), table.concat(info.auth_suites), table.concat(info.group_ciphers)}
                elseif info.enabled then
                        return translate("Unknown")
                else