Javier Subervi wrote:


<div align="center" tal:condition="here/hasSearchEngine(mycontext)">

And where is mycontext defined? You will need a tal:define="mycontext here" or something.


I tested the following script with "mycontext" as a passed parameter:

return 0

catalog = ''
try:
    catalog = getattr(mycontext, mycontext.superValues('ZCatalog')[0].id)
except:
    pass

"Bare" except? You bad boy!

Use except AttributeError:

In fact remove the try/except and study the trace output.

Suresh

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to