1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-28 09:22:36 +01:00

Fix ttls template

Add a guiutils module for gui-related functions/classes that are used in multiple modules.
Replace os.access with os.path.exists
Make the static gateway entry optional.
Don't auto-connect/reconnect when the gui is open.
Fix bug that would keep the gui from working if the wired network entry was displayed.
This commit is contained in:
Dan O'Reilly
2009-01-19 01:06:57 -05:00
parent 75219d78c4
commit ea4ab09984
13 changed files with 78 additions and 217 deletions

View File

@@ -399,7 +399,7 @@ def choose_sudo_prog():
for p in env_path:
paths.extend([p + '/gksudo', p + "/gksu", p + '/ktsuss'])
for path in paths:
if os.access(path, os.F_OK):
if os.path.exists(path):
return path
return None
@@ -414,7 +414,7 @@ def find_path(cmd):
"""
paths = os.getenv("PATH", default="/usr/bin:/usr/local/bin").split(':')
for path in paths:
if os.access(os.path.join(path, cmd), os.F_OK):
if os.path.exists(os.path.join(path, cmd)):
return os.path.join(path, cmd)
return None