X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FPlugins%2FSystemPlugins%2FWOLSetup%2Fplugin.py;fp=lib%2Fpython%2FPlugins%2FSystemPlugins%2FWOLSetup%2Fplugin.py;h=bf29218f5c4a8bce16b3662d7a095c8d9d0ca6fb;hp=1276b1e3fecff6f8d6474bcc9a0425f2cfc46e24;hb=8d6204fa8ce5d67ebc0d5dbae5c77cce481b503d;hpb=6b6c203ad5b4855eae18ff3a4667a67f74a9a82f diff --git a/lib/python/Plugins/SystemPlugins/WOLSetup/plugin.py b/lib/python/Plugins/SystemPlugins/WOLSetup/plugin.py index 1276b1e..bf29218 100644 --- a/lib/python/Plugins/SystemPlugins/WOLSetup/plugin.py +++ b/lib/python/Plugins/SystemPlugins/WOLSetup/plugin.py @@ -118,8 +118,7 @@ class WOLSetup(ConfigListScreen, Screen): config.plugins.wolconfig.location.value = self.backup["location"] def OnKeyGreenCB(self, answer): - answer = answer and answer[1] - if answer == "n": + if not answer: self.Restore() return self.Save() @@ -136,7 +135,7 @@ class WOLSetup(ConfigListScreen, Screen): self.close() return message = _("If WOL is enabled, power consumption will be around 2W.\nErP Standby Power Regulation (<0.5W at standby) cannot be met.\nProceed?") - self.session.openWithCallback(self.OnKeyGreenCB, ChoiceBox, title=message, list=((_("Yes"), "y"), (_("No"), "n"),)) + self.session.openWithCallback(self.OnKeyGreenCB, MessageBox, message, MessageBox.TYPE_YESNO, default = True) def OnKeyCancel(self): self.Restore() @@ -166,7 +165,6 @@ class WOLSetup(ConfigListScreen, Screen): return if writeDevice: os.system('echo "%s" > %s' % (enable and "enable" or "disble",_deviseWOL)) - os.system("ethtool -s %s wol %s" % (_ethDevice, enable and "g" or "d")) @staticmethod def DeepStandbyNotifierCB(self=None): @@ -201,4 +199,3 @@ def Plugins(**kwargs): l.append(PluginDescriptor(where=PluginDescriptor.WHERE_SESSIONSTART, fnc=SessionStartMain)) l.append(PluginDescriptor(where=PluginDescriptor.WHERE_MENU, fnc=MenuSelected)) return l -