Skip to content

Instantly share code, notes, and snippets.

@cluther
Created April 22, 2010 21:02
Show Gist options
  • Save cluther/375809 to your computer and use it in GitHub Desktop.
Save cluther/375809 to your computer and use it in GitHub Desktop.
# This script looks for, and fixes problems where zDeviceTemplates was
# set as a regular object attribute instead of through the acquisition
# mechanism.
from Acquisition import aq_base
for d in dmd.Devices.getSubDevices():
if hasattr(aq_base(d), 'zCollectorPlugins') and not d.hasProperty('zCollectorPlugins'):
print "%s has the problem." % d.id
templates = d.zCollectorPlugins
del(d.zCollectorPlugins)
d._setProperty('zCollectorPlugins', templates)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment