On Thu, 2008-08-14 at 01:18 +0000, shaskell wrote:
> I'm trying to reset template bindings for all my devices through zendmd.
> If I attempt to do it on a server that has only the default bindings, I get 
> this error:
> ValueError: The property zDeviceTemplates does not exist

you could try something like this:

for dev in dmd.Devices.Server.Linux.getSubDevices():
  if dev.id == 'myserver':
    try:
      dev.removeZDeviceTemplates()
    except ValueError:
      pass
commit()

It will catch the ValueError and ignore it. Of if you want to ignore all
possible errors you can just plain 'except' instead of the 'except
ValueError' line.

Regards,
  Sami
-- 
Sami Haahtinen <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to