[Zope-DB] access to DB.Database_Error
Matthew T. Kromer
matt@zope.com
Thu, 2 May 2002 07:29:49 -0400
I doubt highly that the python script machinery considers the DB package
to be safe to import, so that is why you are having security assertions
raised.
One workaround is to create an external method which does the import and
then returns the necessary objects when called.
On Thursday, May 2, 2002, at 05:59 AM, Godefroid Chapelle wrote:
> Hi,
>
> I am trying to build a set of Python scripts accessing DB independant
> of the DA used.
>
> I do not know how to import the DB.Database_Error in order to have
> selective try: except: catches.
>
> I tried
>
> from Shared.DC.ZRDB.db_dbi import DB
> Database_error = DB.Database_Error
>
> but I get an unauthorized to DC module.
>
> Can anyone help ?
>
> Thanks
> --
>
> Godefroid Chapelle
>
> BubbleNet sprl
> rue Victor Horta, 18 / 202
> 1348 Louvain-la-Neuve
> Belgium
>
> Tel + 32 (10) 459901
> Mob + 32 (477) 363942
>
> TVA 467 093 008
> RC Niv 49849
>
>
>
> _______________________________________________
> Zope-DB mailing list
> Zope-DB@zope.org
> http://lists.zope.org/mailman/listinfo/zope-db