NimSelection: use slot_name from NIM class to get slot name
authorAthanasios Oikonomou <athoik@gmail.com>
Thu, 17 Dec 2015 17:28:32 +0000 (19:28 +0200)
committerErik Slagter <erik@openpli.org>
Fri, 18 Dec 2015 09:36:22 +0000 (10:36 +0100)
IndexError: list index out of range will occur if there are more that 4 tuners.

Instead use slot_name from NIM class that already provides the same information.
and works without issues for 26 slot positions (A to Z).

(cherry picked from commit 4303fcd4144d0aad588c585e6ab54f824e2a50a6)
Signed-off-by: Erik Slagter <erik@openpli.org>

lib/python/Screens/Satconfig.py

index 3fcc980..5ea1fd3 100644 (file)
@@ -636,7 +636,7 @@ class NimSelection(Screen):
                                                text = { "loopthrough": _("Loop through to"),
                                                                 "equal": _("Equal to"),
                                                                 "satposdepends": _("Second cable of motorized LNB") } [nimConfig.configMode.value]
-                                               text += " " + _("Tuner") + " " + ["A", "B", "C", "D"][int(nimConfig.connectedTo.value)]
+                                               text += " " + nimmanager.getNim(int(nimConfig.connectedTo.value)).slot_name
                                        elif nimConfig.configMode.value == "nothing":
                                                text = _("not configured")
                                        elif nimConfig.configMode.value == "simple":