luci-base: handle potential crash in luci.model.network.interface.get_i18n()
Should prevent the crash mentioned in #1779. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
9ed48ef2a6
commit
64da34b13c
1 changed files with 1 additions and 1 deletions
|
@ -1273,7 +1273,7 @@ function interface.get_i18n(self)
|
||||||
return "%s: %s %q" %{
|
return "%s: %s %q" %{
|
||||||
lng.translate("Wireless Network"),
|
lng.translate("Wireless Network"),
|
||||||
self.wif:active_mode(),
|
self.wif:active_mode(),
|
||||||
self.wif:active_ssid() or self.wif:active_bssid() or self.wif:id()
|
self.wif:active_ssid() or self.wif:active_bssid() or self.wif:id() or "?"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return "%s: %q" %{ self:get_type_i18n(), self:name() }
|
return "%s: %q" %{ self:get_type_i18n(), self:name() }
|
||||||
|
|
Loading…
Reference in a new issue