~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lsprof.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-02-01 23:48:08 UTC
  • mfrom: (2225.1.6 revert)
  • Revision ID: pqm@pqm.ubuntu.com-20070201234808-3b1302d73474bd8c
Display changes made by revert

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
    try:
163
163
        mname = _fn2mod[code.co_filename]
164
164
    except KeyError:
165
 
        for k, v in sys.modules.iteritems():
 
165
        for k, v in sys.modules.items():
166
166
            if v is None:
167
167
                continue
168
 
            if not hasattr(v, '__file__'):
 
168
            if getattr(v, '__file__', None) is None:
169
169
                continue
170
170
            if not isinstance(v.__file__, str):
171
171
                continue