Commit 2f651585b92986e89f6f810c17b69db5f31f4395
1 parent
5e4ec4d7
Exists in
master
and in
4 other branches
Fix widget import mudule
Signed-off-by: Alexandre Barbosa <alexandreab@live.com> Signed-off-by: Gustavo Jaruga <darksshades@gmail.com>
Showing
1 changed file
with
3 additions
and
4 deletions
Show diff stats
colab/utils/conf.py
@@ -151,12 +151,11 @@ def load_widgets_settings(): | @@ -151,12 +151,11 @@ def load_widgets_settings(): | ||
151 | if not os.path.exists(py_path): | 151 | if not os.path.exists(py_path): |
152 | return | 152 | return |
153 | 153 | ||
154 | - if not os.path.exists(settings_file): | ||
155 | - return | ||
156 | - | ||
157 | original_path = sys.path | 154 | original_path = sys.path |
158 | sys.path.append(py_path) | 155 | sys.path.append(py_path) |
159 | - importlib.import_module(settings_module) | 156 | + |
157 | + if os.path.exists(settings_file): | ||
158 | + importlib.import_module(settings_module) | ||
160 | 159 | ||
161 | # Read settings from widgets.d | 160 | # Read settings from widgets.d |
162 | settings_dir = os.getenv('COLAB_WIDGETS', '/etc/colab/widgets.d') | 161 | settings_dir = os.getenv('COLAB_WIDGETS', '/etc/colab/widgets.d') |