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