luci-app-travelmate: fix wireless scan

* fix possible crash during wireless scan
  when no valid WPA label was found

Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Dirk Brenken 2018-10-21 08:37:56 +02:00
parent a2a5110902
commit 9232cee7a4

View 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