[Zope-dev] Re: Uninstall Leakfinder

Chris Withers chrisw@nipltd.com
Thu, 09 Aug 2001 10:02:58 +0100


Shane Hathaway wrote:
> 
> Chris Withers wrote:
> 
> >What the recommended way to uninstall the Leakfinder product?
> >
> There isn't an easy way right now.  Here's a fix to your external method:
> 

This is the one I ended up with, in case it's of use to anyone else:
from zLOG import LOG, ERROR
import sys

def fix_cp(self):
    cp = self.Control_Panel
    try: del cp.LeakFinder
    except:
        LOG('Fixup',ERROR,'Exception Occurred:',error=sys.exc_info())
    try:
        del cp._objects
    except:
        LOG('Fixup',ERROR,'Exception Occurred:',error=sys.exc_info())

    return 'Done'