On Tue, Jul 29, 2008 at 12:09 AM, Tres Seaver <tseaver@palladion.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
vyshakh krishnan wrote:
Hi Everyone,
The deprecation warning while testing Product module is
/home/zope/ztrunk25/lib/python/OFS/SimpleItem.py:248: DeprecationWarning: raising a string exception is deprecated raise error_type, v, tb
Is it enough to define a new sub class of Exception which accept error_type,v as arguments and just print these messages to fix this warning?
First, remove the forced conversion of 'error_type' to a string. Does that make the warning go away?
I have tried to remove this forced conversion and came to notice that following code is doing this conversion of error_type from <class 'zExceptions.NotFound'> to string /home/zope/ztrunk25/lib/python/OFS/SimpleItem.py(186) if hasattr(error_type, '__name__'): error_type=error_type.__name__ But I couldn't make proper type cast here. Can anybody help me in doing so?
Many of the the warnings in other modules are found similar to this warning.
Please enumerate them.
Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIjhJj+gerLs4ltQ4RArauAKDDLVHNc936dYCXUI4v9Ec22/sbfQCfcMHq +N2ioO1db1R86IYZAFONNSY= =cLbS -----END PGP SIGNATURE-----
regards vyshakh