[Zope] Trapping exceptions

Maciej Wisniowski maciej.wisniowski at coig.katowice.pl
Tue Feb 28 18:21:52 EST 2006


Tony Middleton wrote:

>
> This gave error global name 'SMTPSenderRefused' is not defined
>
> I tried importing smtplib and adding it to the except line and then 
> got a permissions problem.
>
> You are not allowed to access SMTPSenderRefused in this context
>
> I'd appreciate any help with this.
>
You may put this code into external method - then you'll have no problem 
with permissions
or, if you really need this, you may declare necessary modules as 
permitted to Zope - this is
described in Products/PythonScripts/module_access_examples.py.

-- 
Maciej Wisniowski


More information about the Zope mailing list