fixed static_dir of modules; omit hidden files in modules_enabled directory

This commit is contained in:
fonfon authored and Sunil Mohan Adapa committed 2014-10-20 00:14:09 +05:30
1 parent b793dc984a
commit 699a3ac0dc
2 files changed
+8 -4

No files matched your search

+4 -1
View File
@@ -142,7 +142,10 @@ def get_modules_to_load():
modules = []
module_directory = os.path.join(cfg.config_dir, 'modules-enabled')
for file_name in os.listdir(module_directory):
# omit hidden files
file_names = [f for f in os.listdir(module_directory) if not
f.startswith(".")]
for file_name in file_names:
full_file_name = os.path.join(module_directory, file_name)
with open(full_file_name, 'r') as file:
for line in file: