Changeset 6827


Ignore:
Timestamp:
Apr 17, 2009, 2:32:45 PM (16 years ago)
Author:
rwilson
Message:

Fixed the reporting of the source of the log message.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/numpy/anuga/utilities/log.py

    r6781 r6827  
    120120    frames = traceback.extract_stack()
    121121    frames.reverse()
     122    (_, mod_name) = __name__.rsplit('.', 1)
    122123    for (fpath, lnum, mname, _) in frames:
    123         fname = os.path.basename(mname).rsplit('.', 1)[0]
    124         if mname != __name__:
     124        print 'os.path.basename(fpath)=%s' % os.path.basename(fpath)
     125        (fname, _) = os.path.basename(fpath).rsplit('.', 1)
     126        if fname != mod_name:
    125127            break
    126128
Note: See TracChangeset for help on using the changeset viewer.