Commit 8f8240bd6329e1e12cdda30fca2dfab451530517
1 parent
854a1dad
Exists in
master
and in
25 other branches
Better messaging when failing
Signed-off-by: Sergio Oliveira <sergio@tracy.com.br>
Showing
1 changed file
with
7 additions
and
2 deletions
Show diff stats
colab/utils/conf.py
@@ -98,15 +98,20 @@ def load_colab_apps(): | @@ -98,15 +98,20 @@ def load_colab_apps(): | ||
98 | app_name = "" | 98 | app_name = "" |
99 | file_module = file_name.split('.')[0] | 99 | file_module = file_name.split('.')[0] |
100 | 100 | ||
101 | - logger.info('Loaded plugin settings: %s%s', plugins_dir, file_name) | ||
102 | - py_settings_d = _load_py_file(file_module, plugins_dir) | 101 | + logger.info('Loading plugin settings: %s%s', plugins_dir, file_name) |
103 | 102 | ||
104 | if os.path.isdir(os.path.join(plugins_dir, file_name)): | 103 | if os.path.isdir(os.path.join(plugins_dir, file_name)): |
104 | + py_settings_d = _load_py_file(file_module, plugins_dir) | ||
105 | app_name = file_name | 105 | app_name = file_name |
106 | 106 | ||
107 | elif file_name.endswith('.py'): | 107 | elif file_name.endswith('.py'): |
108 | + py_settings_d = _load_py_file(file_module, plugins_dir) | ||
108 | app_name = py_settings_d.get('name', '').split('.')[-1] | 109 | app_name = py_settings_d.get('name', '').split('.')[-1] |
109 | 110 | ||
111 | + else: | ||
112 | + logger.info("Not a plugin config: %s", file_name) | ||
113 | + continue | ||
114 | + | ||
110 | if not app_name: | 115 | if not app_name: |
111 | logger.warning("Plugin missing name variable (%s)", file_name) | 116 | logger.warning("Plugin missing name variable (%s)", file_name) |
112 | continue | 117 | continue |