def edit_scripts(self, widget=None, event=None): """ Launch the script editting dialog. """ cmdend = [os.path.join(wpath.gtk, "configscript.py"), str(self.networkID), "wireless"] if os.getuid() != 0: cmdbase = misc.get_sudo_cmd(language['scripts_need_pass'], prog_num=daemon.GetSudoApp()) if not cmdbase: error(None, language["no_sudo_prog"]) return cmdbase.extend(cmdend) misc.LaunchAndWait(cmdbase) else: misc.LaunchAndWait(cmdend)
def edit_scripts(self, widget=None, event=None): """ Launch the script editting dialog. """ profile = self.prof_name cmdend = [os.path.join(wpath.gtk, "configscript.py"), profile, "wired"] if os.getuid() != 0: cmdbase = misc.get_sudo_cmd(language['scripts_need_pass'], prog_num=daemon.GetSudoApp()) if not cmdbase: error(None, language["no_sudo_prog"]) return cmdbase.extend(cmdend) misc.LaunchAndWait(cmdbase) else: misc.LaunchAndWait(cmdend)
def edit_scripts(self, widget=None, event=None): """ Launch the script editting dialog. """ cmdend = [os.path.join(wpath.gtk, "configscript.py"), str(self.networkID), "wireless"] if os.getuid() != 0: cmdbase = misc.get_sudo_cmd(_('You must enter your password to configure scripts'), prog_num=daemon.GetSudoApp()) if not cmdbase: error(None, _('Could not find a graphical sudo program. '\ 'The script editor could not be launched. '\ "You'll have to edit scripts directly your configuration file.")) return cmdbase.extend(cmdend) misc.LaunchAndWait(cmdbase) else: misc.LaunchAndWait(cmdend)