don't allow leaving the software update plugin while ipkg is running
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Mon, 18 Dec 2006 17:05:47 +0000 (17:05 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Mon, 18 Dec 2006 17:05:47 +0000 (17:05 +0000)
lib/python/Components/Ipkg.py
lib/python/Plugins/SystemPlugins/SoftwareUpdate/plugin.py

index 25e197973b3eff353b5f712cc6289d09c00da88a..df700d6b5b1fa5d07712983f0f06b9149344c77b 100644 (file)
@@ -104,4 +104,10 @@ class Ipkg:
                self.callbackList.append(callback)
                
        def getFetchedList(self):
-               return self.fetchedList
\ No newline at end of file
+               return self.fetchedList
+       
+       def stop(self):
+               self.cmd.kill()
+               
+       def isRunning(self):
+               return self.cmd.running()
index 19ab3eea71bf2437e20cc7b5ed23fe5b7aea77b0..dc494e6f1517a1ff08ce7611b7eeb3a4b6e47b25 100644 (file)
@@ -327,10 +327,11 @@ class UpdatePlugin(Screen):
                pass
        
        def exit(self):
-               if self.packages != 0 and self.error == 0:
-                       self.session.openWithCallback(self.exitAnswer, MessageBox, _("Upgrade finished. Do you want to reboot your Dreambox?"))
-               else:
-                       self.close()
+               if not self.ipkg.isRunning():
+                       if self.packages != 0 and self.error == 0:
+                               self.session.openWithCallback(self.exitAnswer, MessageBox, _("Upgrade finished. Do you want to reboot your Dreambox?"))
+                       else:
+                               self.close()
                        
        def exitAnswer(self, result):
                if result is not None and result: