[Zope-Checkins] CVS: Zope/lib/python/App - ApplicationManager.py:1.77.16.2

Martijn Pieters mj@zope.com
Wed, 13 Nov 2002 10:55:57 -0500


Update of /cvs-repository/Zope/lib/python/App
In directory cvs.zope.org:/tmp/cvs-serv16498/lib/python/App

Modified Files:
      Tag: Zope-2_5-branch
	ApplicationManager.py 
Log Message:
Issue #670 is a feature, not a bug! It does not belong on a maintenance
branch.


=== Zope/lib/python/App/ApplicationManager.py 1.77.16.1 => 1.77.16.2 ===
--- Zope/lib/python/App/ApplicationManager.py:1.77.16.1	Wed Nov 13 05:30:54 2002
+++ Zope/lib/python/App/ApplicationManager.py	Wed Nov 13 10:55:56 2002
@@ -172,19 +172,15 @@
 
     manage_profile=DTMLFile('dtml/profile', globals())
 
-    def manage_profile_stats(self, sort='time', limit=200, stripDirs=1, mode='stats'):
+    def manage_profile_stats(self, sort='time', limit=200):
         """Return profile data if available"""
         stats=getattr(sys, '_ps_', None)
         if stats is None:
             return None
         output=StringIO()
         stdout=sys.stdout
-        if stripDirs:
-            from copy import copy; stats= copy(stats)
-            stats.strip_dirs()
-        stats.sort_stats(sort)
         sys.stdout=output
-        getattr(stats,'print_%s' % mode)(limit)
+        stats.strip_dirs().sort_stats(sort).print_stats(limit)
         sys.stdout.flush()
         sys.stdout=stdout
         return output.getvalue()