~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Ian Clatworthy
  • Date: 2007-06-06 11:06:04 UTC
  • mto: This revision was merged to the branch mainline in revision 2527.
  • Revision ID: ian.clatworthy@internode.on.net-20070606110604-ou544q3egg7tko88
removed old profiling data saving code from UI layer

Show diffs side-by-side

added added

removed removed

Lines of Context:
541
541
        stats.pprint()
542
542
    else:
543
543
        stats.save(filename)
544
 
        outfile = open(filename, 'wb')
545
 
        try:
546
 
            if filename.endswith(".callgrind"):
547
 
                stats.calltree(outfile)
548
 
            elif filename.endswith(".txt"):
549
 
                stats.pprint(file=outfile)
550
 
            else:
551
 
                stats.freeze()
552
 
                cPickle.dump(stats, outfile, 2)
553
 
        finally:
554
 
            outfile.close()
555
544
        print 'Profile data written to %r.' % filename
556
545
    return ret
557
546