Created
April 22, 2010 21:02
-
-
Save cluther/375809 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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