File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 44
55import os
66import logging
7+ import json
78
89import csh_ldap
910from flask import Flask
2425if os .path .exists (_pyfile_config ):
2526 app .config .from_pyfile (_pyfile_config )
2627
27- app .config ["VERSION" ] = __version__
28+ # Fetch the version number from the npm package file
29+ _package_file = open (os .path .join (_root_dir , "package.json" ))
30+ app .config ["VERSION" ] = json .load (_package_file )["version" ]
2831
2932# Logger configuration
3033logging .getLogger ().setLevel (app .config ["LOG_LEVEL" ])
34+ app .logger .info ("Launching packet v" + app .config ["VERSION" ])
3135
3236# Initialize the extensions
3337db = SQLAlchemy (app )
3438migrate = Migrate (app , db )
39+ app .logger .info ("SQLAlchemy pointed at " + repr (db .engine .url ))
3540
3641auth = OIDCAuthentication (app , issuer = app .config ["OIDC_ISSUER" ], client_registration_info = {
3742 "client_id" : app .config ["OIDC_CLIENT_ID" ],
4247# LDAP
4348_ldap = csh_ldap .CSHLDAP (app .config ["LDAP_BIND_DN" ], app .config ["LDAP_BIND_PASS" ])
4449
45- app .logger .info ("DB and LDAP configured" )
50+ app .logger .info ("OIDCAuth and LDAP configured" )
4651
4752# pylint: disable=wrong-import-position
4853from . import models
You can’t perform that action at this time.
0 commit comments