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 | 151 | if not os.path.exists(py_path): |
152 | 152 | return |
153 | 153 | |
154 | - if not os.path.exists(settings_file): | |
155 | - return | |
156 | - | |
157 | 154 | original_path = sys.path |
158 | 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 | 160 | # Read settings from widgets.d |
162 | 161 | settings_dir = os.getenv('COLAB_WIDGETS', '/etc/colab/widgets.d') | ... | ... |