Skip to content

Commit

Permalink
Better messaging when failing
Browse files Browse the repository at this point in the history
Signed-off-by: Sergio Oliveira <sergio@tracy.com.br>
  • Loading branch information
seocam committed Aug 31, 2015
1 parent 854a1da commit 8f8240b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions colab/utils/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,20 @@ def load_colab_apps():
app_name = ""
file_module = file_name.split('.')[0]

logger.info('Loaded plugin settings: %s%s', plugins_dir, file_name)
py_settings_d = _load_py_file(file_module, plugins_dir)
logger.info('Loading plugin settings: %s%s', plugins_dir, file_name)

if os.path.isdir(os.path.join(plugins_dir, file_name)):
py_settings_d = _load_py_file(file_module, plugins_dir)
app_name = file_name

elif file_name.endswith('.py'):
py_settings_d = _load_py_file(file_module, plugins_dir)
app_name = py_settings_d.get('name', '').split('.')[-1]

else:
logger.info("Not a plugin config: %s", file_name)
continue

if not app_name:
logger.warning("Plugin missing name variable (%s)", file_name)
continue
Expand Down

0 comments on commit 8f8240b

Please sign in to comment.