def CheckDate(self):
# Check if image is not to old for update (max 30days)
self.CheckDateDone = True
tmpdate = getEnigmaVersionString()
imageDate = date(int(tmpdate[0:4]), int(tmpdate[5:7]), int(tmpdate[8:10]))
datedelay = imageDate + timedelta(days=30)
message = _("Your image is out of date!\n\n"
"After such a long time, there is a risk that your %s %s will not\n"
"boot after online-update, or will show disfunction in running Image.\n\n"
"A new flash will increase the stability\n\n"
"An online update is done at your own risk !!\n\n\n"
"Do you still want to update?") % (getMachineBrand(), getMachineName())
if datedelay > date.today():
self.updating = True
self.activityTimer.start(100, False)
self.ipkg.startCmd(IpkgComponent.CMD_UPGRADE_LIST)
else:
print"[SOFTWAREMANAGER] Your image is to old (%s), you need to flash new !!" %getEnigmaVersionString()
self.session.openWithCallback(self.checkDateCallback, MessageBox, message, default = False)
return
评论列表
文章目录