- lines = os.popen("ipkg update && ipkg upgrade", "r").readlines()
- string = ""
- for x in lines:
- string += x
- self["text"].setText(string)
+ self.session.openWithCallback(self.doUpdate, MessageBox, _("Do you want to update your Dreambox?\nAfter pressing OK, please wait!"))
+
+ def doUpdate(self, val = False):
+ if val:
+ lines = os.popen("ipkg update && ipkg upgrade", "r").readlines()
+ string = ""
+ for x in lines:
+ string += x
+ self["text"].setText(_("Updating finished. Here is the result:") + "\n\n" + string)
+ else:
+ self.close()