~jameinel/bzr/lazy_revno

« back to all changes in this revision

Viewing changes to bzrlib/lsprof.py

  • Committer: John Arbash Meinel
  • Date: 2008-08-06 04:26:59 UTC
  • mfrom: (3477.1.125 +trunk)
  • Revision ID: john@arbash-meinel.com-20080806042659-d3zew8kqrs6shjmp
merge in bzr.dev 3602

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
from _lsprof import Profiler, profiler_entry
12
12
 
13
13
 
14
 
import bzrlib.osutils
15
 
 
16
 
 
17
14
__all__ = ['profile', 'Stats']
18
15
 
19
16
_g_threadmap = {}
131
128
            otherwise the format is given by the filename extension.
132
129
        """
133
130
        if format is None:
134
 
            basename = bzrlib.osutils.basename(filename)
 
131
            basename = os.path.basename(filename)
135
132
            if basename.startswith('callgrind.out'):
136
133
                format = "callgrind"
137
134
            else:
138
 
                ext = bzrlib.osutils.splitext(filename)[1]
 
135
                ext = os.path.splitext(filename)[1]
139
136
                if len(ext) > 1:
140
137
                    format = ext[1:]
141
138
        outfile = open(filename, 'wb')