aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2010-12-13 13:23:15 +0100
committerghost <andreas.monzner@multimedia-labs.de>2010-12-13 13:23:15 +0100
commit1a2a0e2f94f8f9ba64b1e2d11b42bec88ed612d0 (patch)
tree65d41fe70d6ea8d66c5260bf47c153d35e72ec2d /lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
parent485ad5f92eb769b058a8e0c2cc0b60256fbca80b (diff)
parent0fe25bffe34c9a5fd50528d5ff2eb576b149163b (diff)
downloadenigma2-1a2a0e2f94f8f9ba64b1e2d11b42bec88ed612d0.tar.gz
enigma2-1a2a0e2f94f8f9ba64b1e2d11b42bec88ed612d0.zip
Merge remote branch 'remotes/origin/acid-burn/bug_622_swupgrade_networkcheck'
Diffstat (limited to 'lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py')
-rwxr-xr-xlib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py30
1 files changed, 24 insertions, 6 deletions
diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
index 904fbb39..896d9f2c 100755
--- a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
+++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
@@ -1338,9 +1338,9 @@ class UpdatePlugin(Screen):
self["slider"] = self.slider
self.activityslider = Slider(0, 100)
self["activityslider"] = self.activityslider
- self.status = StaticText(_("Upgrading Dreambox... Please wait"))
+ self.status = StaticText(_("Please wait..."))
self["status"] = self.status
- self.package = StaticText()
+ self.package = StaticText(_("Verifying your internet connection..."))
self["package"] = self.package
self.oktext = _("Press OK on your remote control to continue.")
@@ -1351,20 +1351,35 @@ class UpdatePlugin(Screen):
self.activity = 0
self.activityTimer = eTimer()
self.activityTimer.callback.append(self.doActivityTimer)
- self.activityTimer.start(100, False)
self.ipkg = IpkgComponent()
self.ipkg.addCallback(self.ipkgCallback)
- self.updating = True
- self.package.setText(_("Package list update"))
- self.ipkg.startCmd(IpkgComponent.CMD_UPDATE)
+ self.updating = False
self["actions"] = ActionMap(["WizardActions"],
{
"ok": self.exit,
"back": self.exit
}, -1)
+
+ iNetwork.checkNetworkState(self.checkNetworkCB)
+ self.onClose.append(self.cleanup)
+
+ def cleanup(self):
+ iNetwork.stopPingConsole()
+
+ def checkNetworkCB(self,data):
+ if data is not None:
+ if data <= 2:
+ self.updating = True
+ self.activityTimer.start(100, False)
+ self.package.setText(_("Package list update"))
+ self.status.setText(_("Upgrading Dreambox... Please wait"))
+ self.ipkg.startCmd(IpkgComponent.CMD_UPDATE)
+ else:
+ self.package.setText(_("Your network is not working. Please try again."))
+ self.status.setText(self.oktext)
def doActivityTimer(self):
self.activity += 1
@@ -1443,6 +1458,9 @@ class UpdatePlugin(Screen):
self.session.openWithCallback(self.exitAnswer, MessageBox, _("Upgrade finished.") +" "+_("Do you want to reboot your Dreambox?"))
else:
self.close()
+ else:
+ if not self.updating:
+ self.close()
def exitAnswer(self, result):
if result is not None and result: