~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lsprof.py

  • Committer: Alexander Belchenko
  • Date: 2006-07-31 16:12:57 UTC
  • mto: (1711.2.111 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1906.
  • Revision ID: bialix@ukr.net-20060731161257-91a231523255332c
new official bzr.ico

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.items():
 
165
        for k, v in sys.modules.iteritems():
166
166
            if v is None:
167
167
                continue
168
 
            if getattr(v, '__file__', None) is None:
 
168
            if not hasattr(v, '__file__'):
169
169
                continue
170
170
            if not isinstance(v.__file__, str):
171
171
                continue