[Zope] Removing CallProfiler

Dieter Maurer dieter at handshake.de
Tue Oct 21 16:44:51 EDT 2003


Chris Muldrow wrote at 2003-10-21 08:41 -0400:
 > Well, that seemed to have done something, but now I get this error when I
 > try to go to the main Control Panel page:
 > <!--
 > <p>Traceback (innermost last):
 > ...
 > 
 > <li>  Module OFS.ObjectManager, line 240, in _getOb</li>
 > 
 > </ul>AttributeError: CallProfiler

Your "Control_Panel" is now inconsistent: Its "_objects"
tells "CallProfiler" is still there but there is no longer any attribute.

Delete the "CallProfiler" entry in "Control_Panel" as well.

You  know, "_objects" is a tuple and tuples are immutable.
Therefore, you must use something like:

   Control_Panel._objects= Control_Panel._obects[:XXX] + Control_Panel._objects[XXX+1:]

Where "Control_Panel._objects[XXX]" is the "CallProfiler" entry.


In the feature, always you the official API.
In the case of the Control_Panel, this would essentially be:

   from OFS.ObjectManager import ObjectManager

   ObjectManager.manage_delObjects(Control_Panel,[Ids_to_delete])


Dieter



More information about the Zope mailing list