source: TI12-security/trunk/NDGSecurity/python/ndg_security_server/ndg/security/server/wsgi/apploader.py @ 7077

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg-security/TI12-security/trunk/NDGSecurity/python/ndg_security_server/ndg/security/server/wsgi/apploader.py@7077
Revision 7077, 410 bytes checked in by pjkersha, 11 years ago (diff)
  • Property svn:keywords set to Id
Line 
1import os
2from paste.deploy import loadapp
3
4class AppLoaderMiddleware(object):
5    def __init__(self, configFilePath=None):
6        self._configFilePath = configFilePath or \
7            os.environ.get('NDGSEC_WSGI_APPLOADER_CFGFILEPATH')
8           
9        self._app = loadapp('config:%s' % configFilePath)
10
11    def __call__(self, environ, start_response):
12        return self._app(environ, start_response)
Note: See TracBrowser for help on using the repository browser.