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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user