[ZPT] CVS: Products/PageTemplates - PageTemplateFile.py:1.15

Casey Duncan casey@zope.com
Thu, 18 Jul 2002 16:28:56 -0400


I would suggest not using string exceptions in any new coding, they are s=
lated=20
to be deprecated in Python. Perhaps use::

  class StorageError(Exception):
      pass

-Casey

On Thursday 18 July 2002 08:30 am, Albertas Agejevas wrote:
> Update of /cvs-repository/Products/PageTemplates
> In directory cvs.zope.org:/tmp/cvs-serv14481
>=20
> Modified Files:
> =09PageTemplateFile.py=20
> Log Message:
> Fixed a NameError in raise
>=20
>=20
> =3D=3D=3D Products/PageTemplates/PageTemplateFile.py 1.14 =3D> 1.15 =3D=
=3D=3D
>      def __getstate__(self):
>          raise StorageError, ("Instance of AntiPersistent class %s "
>                               "cannot be stored." % self.__class__.__na=
me__)
> +
> +StorageError =3D "StorageError"
>=20
>=20
>=20
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt
>=20