Changeset 1834


Ignore:
Timestamp:
08/03/10 15:07:58 (14 years ago)
Author:
Malte Marquarding
Message:

Can't use logging here as that would be a cyclic dependency\!\!\!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/parameters.py

    r1824 r1834  
    155155def rc_params():
    156156    'Return the default params updated from the values in the rc file'
    157     from asap.logging import asaplog, print_log
    158157    fname = _asap_fname()
    159158
    160159    if fname is None or not os.path.exists(fname):
    161         message = 'could not find rc file; returning defaults'
    162160        ret =  dict([ (key, tup[0]) for key, tup in defaultParams.items()])
    163161        #print message
     162        #message = 'could not find rc file; returning defaults'
    164163        return ret
    165164
     
    172171        tup = line.split(':',1)
    173172        if len(tup) !=2:
    174             #print ('Illegal line #%d\n\t%s\n\tin file "%s"' % (cnt, line, fname))
    175             asaplog.push('Illegal line #%d\n\t%s\n\tin file "%s"' % (cnt, line, fname))
    176             print_log('WARN')
     173            print ('Illegal line #%d\n\t%s\n\tin file "%s"' % (cnt, line, fname))
     174            #asaplog.push('Illegal line #%d\n\t%s\n\tin file "%s"' % (cnt, line, fname))
     175            #print_log('WARN')
    177176            continue
    178177
     
    180179        key = key.strip()
    181180        if not defaultParams.has_key(key):
    182             #print ('Bad key "%s" on line %d in %s' % (key, cnt, fname))
    183             asaplog.push('Bad key "%s" on line %d in %s' % (key, cnt, fname))
    184             print_log('WARN')
     181            print ('Bad key "%s" on line %d in %s' % (key, cnt, fname))
     182            #asaplog.push('Bad key "%s" on line %d in %s' % (key, cnt, fname))
     183            #print_log('WARN')
    185184            continue
    186185
     
    192191        try: cval = converter(val)   # try to convert to proper type or raise
    193192        except ValueError, msg:
    194             #print ('Bad val "%s" on line #%d\n\t"%s"\n\tin file "%s"\n\t%s' % (val, cnt, line, fname, msg))
    195             asaplog.push('Bad val "%s" on line #%d\n\t"%s"\n\tin file "%s"\n\t%s' % (val, cnt, line, fname, str(msg)))
    196             print_log('WARN')
     193            print ('Bad val "%s" on line #%d\n\t"%s"\n\tin file "%s"\n\t%s' % (val, cnt, line, fname, msg))
     194            #asaplog.push('Bad val "%s" on line #%d\n\t"%s"\n\tin file "%s"\n\t%s' % (val, cnt, line, fname, str(msg)))
     195            #print_log('WARN')
    197196            continue
    198197        else:
Note: See TracChangeset for help on using the changeset viewer.