예제 #1
0
 def download(self):
     config.misc.pluginbrowser.po.value = True
     if not (feedsstatuscheck.adapterAvailable()
             and feedsstatuscheck.NetworkUp()):
         self.session.openWithCallback(
             self.close,
             MessageBox,
             _("Your %s %s has no %s access, please check your network settings and make sure you have network cable connected and try again."
               ) % (getMachineBrand(), getMachineName(),
                    feedsstatuscheck.adapterAvailable() and 'internet'
                    or 'network'),
             type=MessageBox.TYPE_INFO,
             timeout=30,
             close_on_any_key=True)
         return
     if kernelMismatch():
         self.session.openWithCallback(
             self.close,
             MessageBox,
             _("The Linux kernel has changed, plugins are not compatible. \nInstall latest image using USB stick or Image Manager."
               ),
             type=MessageBox.TYPE_INFO,
             timeout=30,
             close_on_any_key=True)
         return
     self.session.openWithCallback(
         self.PluginDownloadBrowserClosed,
         PluginDownloadBrowser,
         PluginDownloadBrowser.DOWNLOAD,
         self.firsttime,
         self.menu_path,
     )
     self.firsttime = False
예제 #2
0
	def download(self):
		if not (feedsstatuscheck.adapterAvailable() and feedsstatuscheck.NetworkUp()):
			self.session.openWithCallback(self.close, MessageBox,  _("Your %s %s has no %s access, please check your network settings and make sure you have network cable connected and try again.") % (getMachineBrand(), getMachineName(), feedsstatuscheck.adapterAvailable() and 'internet' or 'network'), type=MessageBox.TYPE_INFO, timeout=30, close_on_any_key=True)
			return
		if kernelMismatch():
			self.session.openWithCallback(self.close, MessageBox, _("The Linux kernel has changed, plugins are not compatible. \nInstall latest image using USB stick or Image Manager."), type=MessageBox.TYPE_INFO, timeout=30, close_on_any_key=True)
			return
		self.session.openWithCallback(self.PluginDownloadBrowserClosed, PluginDownloadBrowser, PluginDownloadBrowser.DOWNLOAD, self.firsttime, self.menu_path,)
		self.firsttime = False