diff options
Diffstat (limited to 'repoze/bfg/registry.py')
| -rw-r--r-- | repoze/bfg/registry.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/repoze/bfg/registry.py b/repoze/bfg/registry.py index 5dda3f7a6..cab95933b 100644 --- a/repoze/bfg/registry.py +++ b/repoze/bfg/registry.py @@ -92,6 +92,10 @@ def asbool(s): return s.lower() in ('t', 'true', 'y', 'yes', 'on', '1') def get_options(kw, environ=os.environ): + """ Update PasteDeploy application settings keywords with + framework-specific key/value pairs (e.g. find + 'BFG_DEBUG_AUTHORIZATION' in os.environ and jam into keyword + args).""" # environ is passed in for unit tests eget = environ.get config_debug_all = kw.get('debug_all', '') @@ -109,13 +113,16 @@ def get_options(kw, environ=os.environ): config_unicode_path_segments = kw.get('unicode_path_segments', '') effective_unicode_path_segments = asbool(eget('BFG_UNICODE_PATH_SEGMENTS', config_unicode_path_segments)) - return { + update = { 'debug_authorization': effective_debug_all or effective_debug_auth, 'debug_notfound': effective_debug_all or effective_debug_notfound, 'reload_templates': effective_reload_templates, 'unicode_path_segments': effective_unicode_path_segments, } + kw.update(update) + return kw + from zope.testing.cleanup import addCleanUp try: addCleanUp(original_getSiteManager.reset) |
