diff options
| author | acid-burn <acid-burn@opendreambox.org> | 2010-11-23 16:02:01 +0100 |
|---|---|---|
| committer | acid-burn <acid-burn@opendreambox.org> | 2010-11-23 16:02:01 +0100 |
| commit | 5138dce8cfa3d4987ebc8899d5fd990883d1a1dc (patch) | |
| tree | ca37001ebf6a0ea614d9f423ae62dd208da188bf /lib/python/Plugins/SystemPlugins | |
| parent | 875ad71cf9bcace9336cb8eafa8974b84a5347b2 (diff) | |
| parent | 0fe25bffe34c9a5fd50528d5ff2eb576b149163b (diff) | |
| download | enigma2-5138dce8cfa3d4987ebc8899d5fd990883d1a1dc.tar.gz enigma2-5138dce8cfa3d4987ebc8899d5fd990883d1a1dc.zip | |
Merge branch 'acid-burn/bug_622_swupgrade_networkcheck' into experimental
Diffstat (limited to 'lib/python/Plugins/SystemPlugins')
| -rwxr-xr-x | lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py | 30 |
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 e1f3e1de..a6a611d3 100755 --- a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py @@ -1335,9 +1335,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.") @@ -1348,20 +1348,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 @@ -1440,6 +1455,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: |
