fix wizard GSOD when condition of last step is not fulfilled
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Fri, 25 Apr 2008 18:01:00 +0000 (18:01 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Fri, 25 Apr 2008 18:01:00 +0000 (18:01 +0000)
lib/python/Screens/Wizard.py

index 206a87c..1d099c9 100644 (file)
@@ -382,6 +382,13 @@ class Wizard(Screen, HelpableScreen):
                
        def updateValues(self):
                print "Updating values in step " + str(self.currStep)
+               # calling a step which doesn't exist can only happen if the condition in the last step is not fulfilled
+               # if a non-existing step is called, end the wizard 
+               if self.currStep >= len(self.wizard):
+                       self.markDone()
+                       self.close()
+                       return
+
                self.timeoutTimer.stop()
                
                if self.configInstance is not None: