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

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


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

Modified Files:
      Tag: Zope-2_6-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.81.6.1 => 1.81.6.2 ===
--- Zope/lib/python/App/ApplicationManager.py:1.81.6.1	Wed Nov 13 05:29:55 2002
+++ Zope/lib/python/App/ApplicationManager.py	Wed Nov 13 10:56:07 2002
@@ -175,19 +175,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()