~ubuntu-branches/ubuntu/karmic/bzr/karmic-proposed

« back to all changes in this revision

Viewing changes to bzrlib/lsprof.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2008-08-25 19:06:49 UTC
  • mfrom: (1.1.44 upstream)
  • Revision ID: james.westby@ubuntu.com-20080825190649-pq87jonr4uvs7s0y
Tags: 1.6-1
New upstream release.

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')