Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic __version__ reporting for extensions #3541

Merged
merged 1 commit into from
Apr 18, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion notebook/serverextensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def validate_serverextension(import_name, logger=None):
try:
mod = importlib.import_module(import_name)
func = getattr(mod, 'load_jupyter_server_extension', None)
version = getattr(mod, '__version__', '')
except Exception:
logger.warning("Error loading server extension %s", import_name)

Expand All @@ -118,7 +119,7 @@ def validate_serverextension(import_name, logger=None):
[logger.info(info) for info in infos]
[logger.warn(warning) for warning in warnings]
else:
logger.info(post_mortem.format(import_name, "", GREEN_OK))
logger.info(post_mortem.format(import_name, version, GREEN_OK))

return warnings

Expand Down