[Zope] Re: (un)restrictedTraverse bug

Dragos Chirila d.chirila@bucarest.finsiel.ro
Thu, 30 Jan 2003 21:14:12 +0200


Hi

I agree with you : urls shouldn't contain any whitespace , but why Zope
accept for instance 1 whitespace for an object id ??
Or , why accepts whitespaces in objects ids ??

My problem is that I'm writing a python product and at some point, will do
an 'restrictedTraverse(url)' ... So, how do I know, that the people who will
use this product are not using whitespaces in ids ? :)
I solved the problem by using try - except to catch the error, but this is
not what I want ...

Anyway, 10x for your reply

dragos



----- Original Message -----
From: "Maik Jablonski" <maik.jablonski@uni-bielefeld.de>
To: <zope@zope.org>
Sent: Thursday, January 30, 2003 9:14 PM
Subject: [Zope] Re: (un)restrictedTraverse bug


> Dragos Chirila wrote:
> > In the root i have a folder called 'xx yy'
> > In a dtml MEthod i have the following line : <dtml-var
> > "restrictedTraverse('xx yy').id">
> >
> > I get an error :
> >
> > Traceback (innermost last):
> > 492, in notFoundError
> > NotFound: (see above)
> > WHY IS THAT ???????????
>
> You should not use any whitespace in Zope-Ids. Think of all Zope-Objects
> as Python-Objects which are mapped to Urls. Python doesn't like any
> whitespace in attributes etc... Urls shouldn't contain any whitespace in
> my opinion! That's really nasty windowish-style...
>
> -maik
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>