/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/lsprof.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-07-18 03:07:07 UTC
  • mfrom: (3535.5.1 lean_imports)
  • Revision ID: pqm@pqm.ubuntu.com-20080718030707-qimx9fv1d4xhlk1m
(jam) Some small import cleanups, to reduce unused dependencies.

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