[Zope] Mail Host problem

Peter Bengtsson mail@peterbe.com
Thu, 2 Aug 2001 09:45:18 +0200


> try:
>   mailhost=getattr(context, context.SuperValues('Mail Host')[0].id)
> except:
>   raise AttributeError, "Cannot find a Mail Host object."
Perhaps you get an AttributeError on SuperValues()

Isn't it: superValues() ??
...if it makes a difference at all.

Besides, superValues() returns a sequence of objects ordered in how close
they are to 'context', so you can:
mailhost = context.superValues('Mail Host')[0]

rm the try: for a moment and paste the error and traceback next time.

Peter