aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/Satconfig.py
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-06-05 09:19:02 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-06-05 09:19:02 +0000
commit35bd21f1d2433cd7f8a29a87048cf0e4ca6a02ee (patch)
tree00c5323ccbe481d528a340a16070b45101ca9c06 /lib/python/Screens/Satconfig.py
parent8ecfc549ce93bc353d6a64f43a0c25dcd65f860e (diff)
downloadenigma2-35bd21f1d2433cd7f8a29a87048cf0e4ca6a02ee.tar.gz
enigma2-35bd21f1d2433cd7f8a29a87048cf0e4ca6a02ee.zip
dont crash when the satellites.xml does not exist or is empty
Diffstat (limited to 'lib/python/Screens/Satconfig.py')
-rw-r--r--lib/python/Screens/Satconfig.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/python/Screens/Satconfig.py b/lib/python/Screens/Satconfig.py
index 5415ae05..398a13e1 100644
--- a/lib/python/Screens/Satconfig.py
+++ b/lib/python/Screens/Satconfig.py
@@ -64,6 +64,7 @@ class NimSetup(Screen, ConfigListScreen):
self.turnFastEpochEnd = None
self.uncommittedDiseqcCommand = None
self.cableScanType = None
+ self.have_advanced = False
if self.nim.isCompatible("DVB-S"):
self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.configMode)
@@ -84,11 +85,12 @@ class NimSetup(Screen, ConfigListScreen):
self.list.append(self.advancedSatsEntry)
cur_orb_pos = self.nimConfig.advanced.sats.orbital_position
satlist = self.nimConfig.advanced.sat.keys()
- if cur_orb_pos not in satlist:
- cur_orb_pos = satlist[0]
- currSat = self.nimConfig.advanced.sat[cur_orb_pos]
- self.fillListWithAdvancedSatEntrys(currSat)
- self.have_advanced = True
+ if cur_orb_pos is not None:
+ if cur_orb_pos not in satlist:
+ cur_orb_pos = satlist[0]
+ currSat = self.nimConfig.advanced.sat[cur_orb_pos]
+ self.fillListWithAdvancedSatEntrys(currSat)
+ self.have_advanced = True
elif self.nim.isCompatible("DVB-C"):
self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.configMode)
self.list.append(self.configMode)