[Zope] index_html always seems to exist

martin f krafft madduck@madduck.net
Sat, 24 May 2003 02:09:42 +0200


--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=iso-8859-15
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

i have a python script doing the following:

  file =3D 'index_html'
  if not hasattr(context.aq_explicit, file):
    context.invokeFactory('Member Profile', id=3Dfile, title=3Dfile)

in English:
  if the current folder does not have an object by the name of
  'index_html', then generate a new 'Member Profile'.

This works beautifully whenever file is set to something that's not
'index_html'; the file gets added if and only if there isn't one
yet.

However, in the case of index_html, it always seems to exist, even
if there is no index_html in the current folder (and yes, I have
verified that context is the right folder).

What am I doing wrong?

Thanks!

--=20
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
=20
keyserver problems? http://keyserver.kjsl.com/~jharris/keyserver.html
get my key here: http://madduck.net/me/gpg/publickey
=20
the reason that every major university
maintains a department of mathematicsis
is that it's cheaper than
institutionalizing all those people.

--PEIAKu/WMn1b1Hv9
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+zrhGIgvIgzMMSnURAjGkAKCBXoLzkURzFWmXhXsSHiuJ/PPmqgCfaskl
CDPOEd9hjEwJ6gFseAn68sc=
=YKrV
-----END PGP SIGNATURE-----

--PEIAKu/WMn1b1Hv9--