Changeset 2448


Ignore:
Timestamp:
03/29/12 15:26:17 (12 years ago)
Author:
Malte Marquarding
Message:

Fix rcParamsverbose? handling. This was ignored.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/logging.py

    r2323 r2448  
    5656            logs = self.logger.pop().strip()
    5757            if len(logs) > 0:
    58                 print >>sys.stdout, logs
    59                 sys.stdout.flush()
     58                if rcParams['verbose']:
     59                    print >>sys.stdout, logs
     60                    if hasattr(sys.stdout, "flush"):
     61                        sys.stdout.flush()
    6062        self._log = ""
    6163
     
    110112        level = "INFO"
    111113        try:
    112             val = f(*args, **kw)
    113             return val
    114         except Exception, ex:
    115             level = "ERROR"
    116             asaplog.push(str(ex))
    117             if rcParams['verbose']:
    118                 pass
    119             else:
    120                 raise
     114            try:
     115                val = f(*args, **kw)
     116                return val
     117            except Exception, ex:
     118                level = "ERROR"
     119                asaplog.push(str(ex))
     120                if rcParams['verbose']:
     121                    pass
     122                else:
     123                    raise
    121124        finally:
    122125            asaplog.post(level, f.func_name)
    123             #asaplog.post(level, ".".join([f.__module__,f.func_name]))
    124126    return wrap_it
    125127
Note: See TracChangeset for help on using the changeset viewer.