diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-04-16 09:38:21 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-04-16 09:38:21 +0000 |
| commit | d9d89d9547e96de26d293fff1c901a25e889411e (patch) | |
| tree | c4ad186e5c8bd260653df940ed6621cfc76b5c83 /lib/python | |
| parent | 2570b9e4322d85405bf56f0c97819c457ea92fa2 (diff) | |
| download | enigma2-d9d89d9547e96de26d293fff1c901a25e889411e.tar.gz enigma2-d9d89d9547e96de26d293fff1c901a25e889411e.zip | |
do not try to scan, when no scan is possible.. (show a messagebox)
this fixes "self.feid = self.scanList[self.run]["feid"]"
IndexError: list index out of range (ServiceScan.py line 64)
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Screens/ScanSetup.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/python/Screens/ScanSetup.py b/lib/python/Screens/ScanSetup.py index 67ea1b19..0b299f7a 100644 --- a/lib/python/Screens/ScanSetup.py +++ b/lib/python/Screens/ScanSetup.py @@ -5,6 +5,7 @@ from Components.ActionMap import NumberActionMap from Components.ConfigList import ConfigList from Components.NimManager import nimmanager from Components.Label import Label +from Screens.MessageBox import MessageBox from enigma import eDVBFrontendParametersSatellite, eComponentScan, eDVBSatelliteEquipmentControl, eDVBFrontendParametersTerrestrial def buildTerTransponder(frequency, @@ -477,6 +478,7 @@ class ScanSimple(Screen): slotid = x[1].parent.configPath print "Scan Tuner", slotid, "-", currentConfigSelectionElement(x[1].parent) if currentConfigSelectionElement(x[1].parent) == "yes": + scanPossible = False tlist = [ ] if nimmanager.getNimType(x[1].parent.configPath) == nimmanager.nimType["DVB-S"]: if two_sat_tuners: @@ -489,14 +491,21 @@ class ScanSimple(Screen): SatList = nimmanager.getSatListForNim(slotid) for sat in SatList: if not two_sat_tuners or (sat[1] in exclusive_nim_sats or slotid == 0): + scanPossible = True print sat getInitialTransponderList(tlist, sat[1]) elif nimmanager.getNimType(x[1].parent.configPath) == nimmanager.nimType["DVB-C"]: + ScanPossible = True getInitialCableTransponderList(tlist, nimmanager.getCableDescription(slotid)) elif nimmanager.getNimType(x[1].parent.configPath) == nimmanager.nimType["DVB-T"]: + ScanPossible = True getInitialTerrestrialTransponderList(tlist, nimmanager.getTerrestrialDescription(slotid)) - scanList.append({"transponders": tlist, "feid": slotid, "flags": eComponentScan.scanNetworkSearch}) - self.session.openWithCallback(self.doNothing, ServiceScan, scanList = scanList) + if scanPossible: + scanList.append({"transponders": tlist, "feid": slotid, "flags": eComponentScan.scanNetworkSearch}) + if len(scanList): + self.session.openWithCallback(self.doNothing, ServiceScan, scanList = scanList) + else: + self.session.open(MessageBox, _("Nothing to scan!\nPlease setup your tuner settings before you start a service scan."), MessageBox.TYPE_ERROR) def doNothing(self): pass |
