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

Make sure we run to_unicode on all properties we read from disk or get from the user (bug 390680).

Don't try to run global scripts of the global script directory doesn't exist (bug 386244).
This commit is contained in:
Dan O'Reilly
2009-07-02 18:26:37 -04:00
parent 27f2890c12
commit 6cedaf0199
3 changed files with 7 additions and 5 deletions

View File

@@ -182,6 +182,8 @@ def WriteLine(my_file, text):
def ExecuteScripts(scripts_dir, verbose=False):
""" Execute every executable file in a given directory. """
if not os.path.exists(scripts_dir):
return
for obj in os.listdir(scripts_dir):
obj = os.path.abspath(os.path.join(scripts_dir, obj))
if os.path.isfile(obj) and os.access(obj, os.X_OK):