fix the KeyError from the previous commit
[enigma2.git] / lib / python / Components / NimManager.py
index 933ebcf76b898ae34072528f5c77de44251a02a8..0452adbe7adccbe3c2c02ab9f039dcebc7f31124 100644 (file)
@@ -127,7 +127,9 @@ class NimManager:
                def startElement(self, name, attrs):
                        if (name == "sat"):
                                #print "found sat " + attrs.get('name',"") + " " + str(attrs.get('position',""))
-                               tpos = attrs.get('position',"")
+                               tpos = int(attrs.get('position',""))
+                               if tpos < 0:
+                                       tpos = 3600 + tpos
                                tname = attrs.get('name',"")
                                self.satellites[tpos] = tname
                                self.satList.append( (tname, tpos) )
@@ -206,7 +208,7 @@ class NimManager:
                return self.sec.getSatList()
 
        def getSatDescription(self, pos):
-               return self.satellites[str(pos)]
+               return self.satellites[pos]
 
        def readSatsfromFile(self):
                self.satellites = { }