[Zope-Checkins] SVN: Zope/trunk/lib/python/OFS/Traversable.py
reverted last change
Andreas Jung
andreas at andreas-jung.com
Tue Feb 28 13:09:31 EST 2006
Log message for revision 65601:
reverted last change
Changed:
U Zope/trunk/lib/python/OFS/Traversable.py
-=-
Modified: Zope/trunk/lib/python/OFS/Traversable.py
===================================================================
--- Zope/trunk/lib/python/OFS/Traversable.py 2006-02-28 18:02:38 UTC (rev 65600)
+++ Zope/trunk/lib/python/OFS/Traversable.py 2006-02-28 18:09:31 UTC (rev 65601)
@@ -133,6 +133,12 @@
If true, then all of the objects along the path are validated with
the security machinery. Usually invoked using restrictedTraverse().
"""
+
+ if not isinstance(path, str):
+ path = [x for x in path if x]
+
+ print 'r',self.absolute_url(1), path
+
if not path:
return self
@@ -173,7 +179,7 @@
name = path_pop()
__traceback_info__ = path, name
- if name.startswith('_'):
+ if name[0] == '_':
# Never allowed in a URL.
raise NotFound, name
@@ -238,7 +244,7 @@
security.declarePublic('restrictedTraverse')
def restrictedTraverse(self, path, default=_marker):
- # Trusted code traversal code, always enforces security
+ # Trusted code traversal code, always enforces securitys
return self.unrestrictedTraverse(path, default, restricted=1)
InitializeClass(Traversable)
More information about the Zope-Checkins
mailing list