1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-22 14:07:59 +01:00

Only check for wireless tools in the ioctl backend if wpactrl isn't available.

Fix up error handling when there is no graphical sudo program installed.
This commit is contained in:
Dan O'Reilly
2009-04-11 18:53:30 -04:00
parent 0aaba8c439
commit 0a007d0f44
3 changed files with 9 additions and 5 deletions

View File

@@ -155,6 +155,8 @@ def PromptToStartDaemon():
""" Prompt the user to start the daemon """
daemonloc = wpath.sbin + 'wicd'
sudo_prog = choose_sudo_prog()
if not sudo_prog:
return False
if "gksu" in sudo_prog or "ktsuss" in sudo_prog:
msg = '--message'
else:
@@ -163,6 +165,7 @@ def PromptToStartDaemon():
'Wicd needs to access your computer\'s network cards.',
daemonloc]
os.spawnvpe(os.P_WAIT, sudo_prog, sudo_args, os.environ)
return True
def RunRegex(regex, string):
""" runs a regex search on a string """
@@ -453,8 +456,7 @@ def choose_sudo_prog(prog_num=0):
for path in paths:
if os.path.exists(path):
return path
return None
return ""
def find_path(cmd):
""" Try to find a full path for a given file name.