Changeset 7599 for cows


Ignore:
Timestamp:
12/10/10 14:38:37 (9 years ago)
Author:
astephen
Message:

Fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cows/tags/1.6.0-py2.6/cows/pylons/config.py

    r6422 r7599  
    2929 
    3030 
    31 def configCSML(): 
     31def configCSML(app_config=None): 
    3232    """Initialise the configuration of the CSML backend from pylons.config. 
     33 
     34    For Pylons>=1.0 the pylons.config object is passed in explicitly. 
     35    If app_config=None Pylons-0.9.6.1 behaviour is assumed. 
    3336 
    3437    """ 
    3538     
    36     for k in pylons.config: 
     39    if app_config is None: 
     40        app_config = pylons.config 
     41 
     42    for k in app_config: 
    3743        parts = k.split('.') 
    3844        if parts[:2] == ['cows', 'csml']: 
    3945            k2 = '.'.join(parts[2:]) 
    40             config[k2] = pylons.config[k] 
     46            config[k2] = app_config[k] 
    4147     
    4248    #set up the CSML symlink checker to check all symlinks in the csmlstore 
Note: See TracChangeset for help on using the changeset viewer.