Changeset 3406 for nappy


Ignore:
Timestamp:
12/02/08 23:13:30 (12 years ago)
Author:
astephen
Message:

Tested some of this with working functions.

Location:
nappy/trunk/nappy/utils
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • nappy/trunk/nappy/utils/__init__.py

    r3321 r3406  
     1from parse_config import getConfigDict 
     2from common_utils import getDebug, getVersion 
  • nappy/trunk/nappy/utils/common_utils.py

    r3399 r3406  
    101101    Gets config dict for version. 
    102102    """ 
    103     version = nappy.utils.parse_config.getConfigDict()["DEFAULT"]["version"] 
     103    version = nappy.utils.parse_config.getConfigDict()["main"]["version"] 
    104104    return version 
    105105 
     
    108108    Returns true or false for DEBUG status. 
    109109    """ 
    110     DEBUG = nappy.utils.parse_config.getConfigDict()["DEFAULT"]["DEBUG"] 
     110    DEBUG = nappy.utils.parse_config.getConfigDict()["main"]["DEBUG"] 
    111111    return eval(DEBUG) 
    112112 
  • nappy/trunk/nappy/utils/parse_config.py

    r3387 r3406  
    2828    conf.read(cf) 
    2929 
    30     # Get all defaults 
    31     d["DEFAULT"] = {} 
    32     for i in conf.defaults(): 
    33         d["DEFAULT"][i] = conf.get("DEFAULT", i) 
    34  
    35     # and other needed 
     30    # get all sections and content  
    3631    for section in conf.sections(): 
    3732        d[section] = {} 
Note: See TracChangeset for help on using the changeset viewer.