Ottomata has submitted this change and it was merged. Change subject: add. Flag option to use flask.ext.login for metrics API. ......................................................................
add. Flag option to use flask.ext.login for metrics API. Change-Id: I50c417fcdb5d791bfe79d2ea36f30e7c0ea76fc2 --- M templates/misc/e3-metrics.settings.py.erb 1 file changed, 16 insertions(+), 0 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/templates/misc/e3-metrics.settings.py.erb b/templates/misc/e3-metrics.settings.py.erb index 92cfdcc..98412cb 100644 --- a/templates/misc/e3-metrics.settings.py.erb +++ b/templates/misc/e3-metrics.settings.py.erb @@ -1,3 +1,11 @@ + +from user_metrics.config import logging +from pkg_resources import WorkingSet , DistributionNotFound + +# Get working set of Python modules +working_set = WorkingSet() + + # Project settings # ================ @@ -20,6 +28,14 @@ __secret_key__ = '<%= secret_key %>' +try: + working_set.require('Flask-Login>=0.1.3') + __flask_login_exists__ = True + logging.debug(__name__ + ' :: Using module flask.ext.login...') +except DistributionNotFound: + __flask_login_exists__ = False + logging.debug(__name__ + ' :: Can\'t find module flask.ext.login...') + # Database connection settings # ============================ -- To view, visit https://gerrit.wikimedia.org/r/54513 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I50c417fcdb5d791bfe79d2ea36f30e7c0ea76fc2 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Rfaulk <rfaulk...@wikimedia.org> Gerrit-Reviewer: Ottomata <o...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits