datru wrote:
> if i try to remove my zenpacks:
>
>
> Code:
> zenpack --remove=HPMonitor
> Traceback (most recent call last):
> File "/usr/local/zenoss/zenoss/Products/ZenUtils/zenpack.py", line 379, in ?
> zp.run()
> File "/usr/local/zenoss/zenoss/Products/ZenUtils/zenpack.py", line 148, in
> run
> pack = self.dmd.ZenPackManager.packs._getOb(
> File
> "/usr/local/zenoss/zenoss/Products/ZenRelations/ToManyContRelationship.py",
> line 196, in _getOb
> return self._objects[id].__of__(self)
> AttributeError: 'ZenPack' object has no attribute '__of__'
>
>
>
>
> Is there another way to remove a zenpack?
It sounds like one of your ZenPack installations is broken. You can try pasting
the following script into zendmd to find it and remove it.
Code:
packs = None
if hasattr(dmd, 'ZenPackManager'):
packs = dmd.ZenPackManager.packs
else:
packs = dmd.packs
for pack in packs():
try:
unused = pack.primaryAq()
print "%s is fine." % (pack.id,)
except AttributeError:
print "Problem with %s ZenPack. Forcing removal." % (pack.id,)
packs._remove(pack)
If you like what you see, run a commit() after this to make the changes stick.
You should then reinstall any of the ZenPacks it removed.
-------------------- m2f --------------------
Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=19798#19798
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users